Issue 105 -- DSM2 range check mode completed.
However, I don't like that the only place I could find to turn off range check mode when the SETUP menus is exited, was in popMenu ...
void popMenu()
{
if (g_menuStackPtr>0) {
#ifdef DSM2
s_rangecheck_mode = 0;
#endif
...
}
It was the only way I could find to trap the event of [EXIT long] being pressed
while in the RANGE field and s_editMode==true. But this solution gets executed
for all menu exits -- not just menuProcModels. It works, but there must be a
more eloquent method?
This commit is contained in:
+1
-4
@@ -797,10 +797,7 @@ void menuProcModel(uint8_t event)
|
||||
|
||||
if (IS_DSM2_PROTOCOL(protocol)) { // RANGE CHECK
|
||||
lcd_putsnAtt(MODEL_PARAM_OFS+4*FW, y, PSTR(" RANGE<range")+6*(s_rangecheck_mode), 6, (m_posHorz==1 ? attr : 0));
|
||||
if (attr && m_posHorz==1 && s_editMode>0)
|
||||
s_rangecheck_mode = true;
|
||||
else
|
||||
s_rangecheck_mode = false;
|
||||
s_rangecheck_mode = (attr && m_posHorz==1 && s_editMode>0); // [MENU] key toggles range check mode
|
||||
}
|
||||
|
||||
if (attr && (m_posHorz==0 && (s_editMode>0 || p1valdiff)))
|
||||
|
||||
Reference in New Issue
Block a user