[all] Problem with momentary switches when used in timers. Thanks Gabriel for reporting this bug!

This commit is contained in:
bsongis
2013-03-11 22:21:44 +00:00
parent ea148dfcda
commit 392a10c98d
3 changed files with 4 additions and 2 deletions
+3
View File
@@ -894,6 +894,9 @@ void putsCurve(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
void putsTmrMode(xcoord_t x, uint8_t y, int8_t mode, LcdFlags att) void putsTmrMode(xcoord_t x, uint8_t y, int8_t mode, LcdFlags att)
{ {
if (mode >= TMR_VAROFS+MAX_PSWITCH+NUM_CSW)
mode++;
if (mode < 0) { if (mode < 0) {
mode = TMR_VAROFS - mode - 1; mode = TMR_VAROFS - mode - 1;
lcd_putcAtt(x-1*FW, y, '!', att); lcd_putcAtt(x-1*FW, y, '!', att);
+1 -1
View File
@@ -839,7 +839,7 @@ void menuModelSetup(uint8_t event)
div_t qr = div(timer->start, 60); div_t qr = div(timer->start, 60);
switch (m_posHorz) { switch (m_posHorz) {
case 0: case 0:
CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW)-1, TMR_VAROFS+2*(MAX_PSWITCH+NUM_CSW)); CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW)-1, TMR_VAROFS-1+2*(MAX_PSWITCH+NUM_CSW));
break; break;
case 1: case 1:
CHECK_INCDEC_MODELVAR_ZERO(event, qr.quot, 59); CHECK_INCDEC_MODELVAR_ZERO(event, qr.quot, 59);
-1
View File
@@ -3112,7 +3112,6 @@ void doMixerCalculations()
val >>= (RESX_SHIFT-4); // calibrate it val >>= (RESX_SHIFT-4); // calibrate it
#endif #endif
// Timers start // Timers start
for (uint8_t i=0; i<MAX_TIMERS; i++) { for (uint8_t i=0; i<MAX_TIMERS; i++) {
int8_t tm = g_model.timers[i].mode; int8_t tm = g_model.timers[i].mode;