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
|
#define SCROLL_POT1_TH 32
|
||||||
|
|
||||||
#ifdef NAVIGATION_RE1
|
#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
|
#else
|
||||||
#define MAXCOL(row) (horTab ? pgm_read_byte(horTab+min(row, horTabMax)) : (const uint8_t)0)
|
#define MAXCOL(row) (horTab ? pgm_read_byte(horTab+min(row, horTabMax)) : (const uint8_t)0)
|
||||||
#endif
|
#endif
|
||||||
|
@ -313,17 +313,13 @@ bool check(uint8_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t menuTa
|
||||||
++scrollRE;
|
++scrollRE;
|
||||||
if (m_posHorz-- == 0) {
|
if (m_posHorz-- == 0) {
|
||||||
if (m_posVert-- <= 0) {
|
if (m_posVert-- <= 0) {
|
||||||
#ifdef NAVIGATION_RE1
|
|
||||||
m_posVert = menuTab ? 0 : -1;
|
m_posVert = menuTab ? 0 : -1;
|
||||||
#else
|
|
||||||
m_posVert = 0;
|
|
||||||
#endif
|
|
||||||
m_posHorz = 0;
|
m_posHorz = 0;
|
||||||
scrollRE = 0;
|
scrollRE = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
maxcol = MAXCOL(m_posVert);
|
maxcol = MAXCOL(m_posVert);
|
||||||
if (maxcol < 0) maxcol = MAXCOL(--m_posVert);
|
if (maxcol < 0) { --m_posVert; maxcol = MAXCOL(m_posVert); }
|
||||||
m_posHorz = maxcol;
|
m_posHorz = maxcol;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue