mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 00:35:18 +03:00
Trainer menu display bug
This commit is contained in:
parent
3e6df4b67c
commit
5e875786cd
3 changed files with 21 additions and 19 deletions
|
@ -1046,10 +1046,10 @@ void menuGeneralTrainer(uint8_t event)
|
||||||
uint8_t y;
|
uint8_t y;
|
||||||
bool slave = SLAVE_MODE();
|
bool slave = SLAVE_MODE();
|
||||||
|
|
||||||
MENU(STR_MENUTRAINER, menuTabDiag, e_Trainer, slave ? 1 : 7, {0, 2, 2, 2, 2, 0/*, 0*/});
|
MENU(STR_MENUTRAINER, menuTabDiag, e_Trainer, (slave ? 1 : 7), {0, 2, 2, 2, 2, 0/*, 0*/});
|
||||||
|
|
||||||
if (slave) { // i am the slave
|
if (slave) {
|
||||||
lcd_puts(7*FW, 3*FH, STR_SLAVE);
|
lcd_puts(7*FW, 4*FH, STR_SLAVE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uint8_t attr;
|
uint8_t attr;
|
||||||
|
|
|
@ -594,22 +594,24 @@ bool check(check_event_t event, uint8_t curr, const MenuFuncP *menuTab, uint8_t
|
||||||
s_pgOfs=0;
|
s_pgOfs=0;
|
||||||
}
|
}
|
||||||
else if (menuTab && horTab) {
|
else if (menuTab && horTab) {
|
||||||
while (1) {
|
if (maxrow > LCD_LINES-1) {
|
||||||
vertpos_t line = s_pgOfs+1;
|
while (1) {
|
||||||
for (int numLines=0; line<=maxrow && numLines<LCD_LINES-1; line++) {
|
vertpos_t line = s_pgOfs+1;
|
||||||
if (MAXCOL(line) != HIDDEN_ROW) {
|
for (int numLines=0; line<=maxrow && numLines<LCD_LINES-1; line++) {
|
||||||
numLines++;
|
if (MAXCOL(line) != HIDDEN_ROW) {
|
||||||
|
numLines++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int max = line - s_pgOfs - 1;
|
||||||
|
if (l_posVert > max+s_pgOfs) {
|
||||||
|
s_pgOfs++;
|
||||||
|
}
|
||||||
|
else if (l_posVert < 1+s_pgOfs) {
|
||||||
|
s_pgOfs--;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
int max = line - s_pgOfs - 1;
|
|
||||||
if (l_posVert > max+s_pgOfs) {
|
|
||||||
s_pgOfs++;
|
|
||||||
}
|
|
||||||
else if (l_posVert < 1+s_pgOfs) {
|
|
||||||
s_pgOfs--;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -552,7 +552,7 @@
|
||||||
#define TR_POTWARNING TR("Pot Warn.", INDENT "Pot Positions")
|
#define TR_POTWARNING TR("Pot Warn.", INDENT "Pot Positions")
|
||||||
#define TR_TIMEZONE TR("Time Zone","GPS Time zone")
|
#define TR_TIMEZONE TR("Time Zone","GPS Time zone")
|
||||||
#define TR_RXCHANNELORD TR("Rx Channel Ord","Default channel order")
|
#define TR_RXCHANNELORD TR("Rx Channel Ord","Default channel order")
|
||||||
#define TR_SLAVE "Slave"
|
#define TR_SLAVE CENTER "Slave"
|
||||||
#define TR_MODESRC "Mode\006% Source"
|
#define TR_MODESRC "Mode\006% Source"
|
||||||
#define TR_MULTIPLIER "Multiplier"
|
#define TR_MULTIPLIER "Multiplier"
|
||||||
#define TR_CAL "Cal"
|
#define TR_CAL "Cal"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue