From 3610d842b5f62e7dc8591d373b31650a05a29dc9 Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Wed, 20 Dec 2017 17:12:45 -0500 Subject: [PATCH] Display the current loop state below the loop counter setting --- app/css/app.css | 6 ++++++ app/css/app.less | 7 +++++++ app/index.html | 1 + app/lib/seq-ui.js | 9 +++++++++ 4 files changed, 23 insertions(+) diff --git a/app/css/app.css b/app/css/app.css index 70c6a35..d79d9cb 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -609,6 +609,12 @@ button:focus { display: inline-block; margin-right: 5px; } +#loop_current { + margin-top: 54px; + width: 121px; + text-align: center; + color: #DAE035; +} #console { background: #000; border-top: 2px solid rgba(255, 255, 255, 0.3); diff --git a/app/css/app.less b/app/css/app.less index 25f9e37..4c701ff 100644 --- a/app/css/app.less +++ b/app/css/app.less @@ -628,6 +628,13 @@ button{ } } +#loop_current{ + margin-top: 54px; + width: 121px; + text-align: center; + color: @SELECTED; +} + #console{ background: #000; border-top: 2px solid rgba(255, 255, 255, 0.3); diff --git a/app/index.html b/app/index.html index 6561600..dc0da36 100644 --- a/app/index.html +++ b/app/index.html @@ -61,6 +61,7 @@

LOOPS

+
diff --git a/app/lib/seq-ui.js b/app/lib/seq-ui.js index e999363..c0102e5 100644 --- a/app/lib/seq-ui.js +++ b/app/lib/seq-ui.js @@ -24,6 +24,9 @@ seq.run = function () { seq.run(); }, mcopy.cfg.arduino.sequenceDelay); } + if (seq.i == 0) { + $('#loop_current').text(gui.fmtZero(mcopy.loopCount + 1, 6)); + } if (seq.stop()) { $('.row input').removeClass('h'); $('#numbers div').removeClass('h'); @@ -55,6 +58,7 @@ seq.run = function () { } } else { mcopy.loopCount++; + $('#loop_current').text(gui.fmtZero(mcopy.loopCount + 1, 6)); if (mcopy.loopCount < mcopy.loop) { log.info('Loop ' + mcopy.loopCount + ' completed', 'SEQUENCE', true); $('.row input').removeClass('h'); @@ -78,6 +82,7 @@ seq.run = function () { //clear gui $('.row input').removeClass('h'); $('#numbers div').removeClass('h'); + $('#loop_current').text(''); seq.stats(); } } @@ -89,6 +94,10 @@ seq.stop = function (state) { } else { seq.stopState = state; } + if (state === false) { + mcopy.loopCount = 0 + $('#loop_current').text(''); + } }; seq.init = function (start) { 'use strict';