Display the current loop state below the loop counter setting
This commit is contained in:
parent
df4eeb9d14
commit
3610d842b5
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
<div id="seq_loop">
|
||||
<h3>LOOPS</h3>
|
||||
<input type="number" min="1" id="seq_loop" value="00001" onchange="this.value = gui.fmtZero(this.value, 6); gui.grid.loopChange(this);"/>
|
||||
<div id="loop_current"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="script" class="screen">
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue