Slave screen did allow editing everything even if nothing displayed

This commit is contained in:
bsongis
2012-03-10 10:16:02 +00:00
parent d3c15495c2
commit d4fb419f4c
+18 -17
View File
@@ -499,29 +499,30 @@ void menuProcTrainer(uint8_t event)
} }
} }
y += FH; y += FH;
}
edit = (m_posVert==5);
lcd_puts(0*FW, 6*FH, STR_MULTIPLIER);
lcd_outdezAtt(13*FW, 6*FH, g_eeGeneral.PPM_Multiplier+10, (edit ? INVERS : 0)|PREC1);
if (edit) CHECK_INCDEC_GENVAR(event, g_eeGeneral.PPM_Multiplier, -10, 40);
edit = (m_posVert==6); edit = (m_posVert==5);
lcd_putsAtt(0*FW, 7*FH, STR_CAL, edit ? INVERS : 0); lcd_puts(0*FW, 6*FH, STR_MULTIPLIER);
for (uint8_t i=0; i<4; i++) { lcd_outdezAtt(13*FW, 6*FH, g_eeGeneral.PPM_Multiplier+10, (edit ? INVERS : 0)|PREC1);
uint8_t x = (i*8+16)*FW/2; if (edit) CHECK_INCDEC_GENVAR(event, g_eeGeneral.PPM_Multiplier, -10, 40);
edit = (m_posVert==6);
lcd_putsAtt(0*FW, 7*FH, STR_CAL, edit ? INVERS : 0);
for (uint8_t i=0; i<4; i++) {
uint8_t x = (i*8+16)*FW/2;
#if defined (DECIMALS_DISPLAYED) #if defined (DECIMALS_DISPLAYED)
lcd_outdezAtt(x, 7*FH, (g_ppmIns[i]-g_eeGeneral.trainer.calib[i])*2, PREC1); lcd_outdezAtt(x, 7*FH, (g_ppmIns[i]-g_eeGeneral.trainer.calib[i])*2, PREC1);
#else #else
lcd_outdezAtt(x, 7*FH, (g_ppmIns[i]-g_eeGeneral.trainer.calib[i])/5, 0); lcd_outdezAtt(x, 7*FH, (g_ppmIns[i]-g_eeGeneral.trainer.calib[i])/5, 0);
#endif #endif
} }
if (edit) { if (edit) {
if (event==EVT_KEY_FIRST(KEY_MENU)){ if (event==EVT_KEY_FIRST(KEY_MENU)){
memcpy(g_eeGeneral.trainer.calib, g_ppmIns, sizeof(g_eeGeneral.trainer.calib)); memcpy(g_eeGeneral.trainer.calib, g_ppmIns, sizeof(g_eeGeneral.trainer.calib));
eeDirty(EE_GENERAL); eeDirty(EE_GENERAL);
AUDIO_KEYPAD_UP(); AUDIO_KEYPAD_UP();
}
} }
} }
} }