Re #2469: part1: Menu system renaming of variables and refactoring (ported #3087 from master commits 3186a5d99..94d8b8b0e8d)
This commit is contained in:
@@ -100,7 +100,7 @@ void menuModelLogicalSwitchOne(uint8_t event)
|
||||
|
||||
SUBMENU_NOTITLE(LS_FIELD_COUNT, {0, 0, 1, 0 /*, 0...*/});
|
||||
|
||||
int8_t sub = m_posVert;
|
||||
int8_t sub = menuVerticalPosition;
|
||||
|
||||
INCDEC_DECLARE_VARS(EE_MODEL);
|
||||
|
||||
@@ -108,7 +108,7 @@ void menuModelLogicalSwitchOne(uint8_t event)
|
||||
|
||||
for (uint8_t k=0; k<LCD_LINES-1; k++) {
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + k*FH;
|
||||
uint8_t i = k + s_pgOfs;
|
||||
uint8_t i = k + menuVerticalOffset;
|
||||
uint8_t attr = (sub==i ? (s_editMode>0 ? BLINK|INVERS : INVERS) : 0);
|
||||
uint8_t cstate = lswFamily(cs->func);
|
||||
switch(i) {
|
||||
@@ -169,9 +169,9 @@ void menuModelLogicalSwitchOne(uint8_t event)
|
||||
v2_max = 122;
|
||||
}
|
||||
else if (cstate == LS_FAMILY_EDGE) {
|
||||
putsEdgeDelayParam(CSWONE_2ND_COLUMN, y, cs, m_posHorz==0 ? attr : 0, m_posHorz==1 ? attr : 0);
|
||||
putsEdgeDelayParam(CSWONE_2ND_COLUMN, y, cs, menuHorizontalPosition==0 ? attr : 0, menuHorizontalPosition==1 ? attr : 0);
|
||||
if (s_editMode <= 0) continue;
|
||||
if (attr && m_posHorz==1) {
|
||||
if (attr && menuHorizontalPosition==1) {
|
||||
CHECK_INCDEC_MODELVAR(event, cs->v3, -1, 222 - cs->v2);
|
||||
break;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ void menuModelLogicalSwitches(uint8_t event)
|
||||
|
||||
coord_t y = 0;
|
||||
uint8_t k = 0;
|
||||
int8_t sub = m_posVert - 1;
|
||||
int8_t sub = menuVerticalPosition - 1;
|
||||
|
||||
switch (event) {
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
@@ -264,7 +264,7 @@ void menuModelLogicalSwitches(uint8_t event)
|
||||
|
||||
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
||||
y = 1 + (i+1)*FH;
|
||||
k = i+s_pgOfs;
|
||||
k = i+menuVerticalOffset;
|
||||
LogicalSwitchData * cs = lswAddress(k);
|
||||
|
||||
// CSW name
|
||||
@@ -325,12 +325,12 @@ void menuModelLogicalSwitches(uint8_t event)
|
||||
MENU(STR_MENULOGICALSWITCHES, menuTabModel, e_LogicalSwitches, NUM_LOGICAL_SWITCH+1, {0, NAVIGATION_LINE_BY_LINE|LS_FIELD_LAST/*repeated...*/});
|
||||
|
||||
uint8_t k = 0;
|
||||
int8_t sub = m_posVert - 1;
|
||||
horzpos_t horz = m_posHorz;
|
||||
int8_t sub = menuVerticalPosition - 1;
|
||||
horzpos_t horz = menuHorizontalPosition;
|
||||
|
||||
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + i*FH;
|
||||
k = i+s_pgOfs;
|
||||
k = i+menuVerticalOffset;
|
||||
uint8_t attr = (sub==k ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
uint8_t attr1 = (horz==1 ? attr : 0);
|
||||
uint8_t attr2 = (horz==2 ? attr : 0);
|
||||
|
||||
Reference in New Issue
Block a user