mirror of
https://github.com/opentx/opentx.git
synced 2025-07-21 23:35:17 +03:00
Bug when editing phase names with Rotary Encoder
This commit is contained in:
parent
6a1f12281c
commit
cdc2beb202
2 changed files with 3 additions and 7 deletions
|
@ -171,7 +171,7 @@ void check_rotary_encoder()
|
|||
#define SCROLL_POT1_TH 32
|
||||
|
||||
#ifdef NAVIGATION_RE1
|
||||
#define MAXCOL(row) ((horTab && row > 0) ? pgm_read_byte(horTab+min(row, (int8_t)horTabMax)) : (const uint8_t)0)
|
||||
#define MAXCOL(row) ((horTab && row >= 0) ? pgm_read_byte(horTab+min(row, (int8_t)horTabMax)) : (const uint8_t)0)
|
||||
#else
|
||||
#define MAXCOL(row) (horTab ? pgm_read_byte(horTab+min(row, horTabMax)) : (const uint8_t)0)
|
||||
#endif
|
||||
|
@ -313,17 +313,13 @@ bool check(uint8_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTa
|
|||
++scrollRE;
|
||||
if (m_posHorz-- == 0) {
|
||||
if (m_posVert-- <= 0) {
|
||||
#ifdef NAVIGATION_RE1
|
||||
m_posVert = menuTab ? 0 : -1;
|
||||
#else
|
||||
m_posVert = 0;
|
||||
#endif
|
||||
m_posHorz = 0;
|
||||
scrollRE = 0;
|
||||
}
|
||||
else {
|
||||
maxcol = MAXCOL(m_posVert);
|
||||
if (maxcol < 0) maxcol = MAXCOL(--m_posVert);
|
||||
if (maxcol < 0) { --m_posVert; maxcol = MAXCOL(m_posVert); }
|
||||
m_posHorz = maxcol;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -421,7 +421,7 @@ void menuProcModel(uint8_t event)
|
|||
lcd_outdezNAtt(7*FW,0,g_eeGeneral.currModel+1,INVERS+LEADING0,2);
|
||||
MENU(STR_MENUSETUP, menuTabModel, e_Model, (g_model.protocol==PROTO_PPM||g_model.protocol==PROTO_DSM2||g_model.protocol==PROTO_PXX ? 12 : 11), {0,ZCHAR|(sizeof(g_model.name)-1),2,2,0,0,0,0,0,6,2,1});
|
||||
|
||||
uint8_t sub = m_posVert;
|
||||
uint8_t sub = m_posVert;
|
||||
uint8_t y = 1*FH;
|
||||
|
||||
uint8_t subN = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue