1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 17:55:19 +03:00

Merge branch 'bsongis/Issue592_sticky_switches' into next

Conflicts:
	radio/src/gui/menu_model.cpp
This commit is contained in:
Andre Bernet 2014-02-07 23:39:28 +01:00
commit 17823786e4
61 changed files with 2606 additions and 2385 deletions

View file

@ -1040,41 +1040,6 @@ void putsSwitches(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
lcd_vlineStip(x-2, y, 8, 0x5E/*'!'*/);
idx = -idx;
}
#if ROTARY_ENCODERS > 0
else if (idx >= SWSRC_FIRST_ROTENC_SWITCH) {
idx -= SWSRC_FIRST_ROTENC_SWITCH;
char suffix = (idx & 1) ? CHR_LONG : CHR_SHORT;
lcd_putsiAtt(x, y, STR_VRENCODERS, idx/2, att);
return lcd_putcAtt(lcdLastPos, y, suffix, att);
}
#endif
#if !defined(PCBSTD)
else if (idx >= SWSRC_TRAINER_SHORT) {
idx -= SWSRC_TRAINER_SHORT;
char suffix = (idx & 1) ? CHR_LONG : CHR_SHORT;
#if ROTARY_ENCODERS > 0
if (idx >= 2) {
idx -= 2;
lcd_putsiAtt(x, y, STR_VRENCODERS, idx/2, att);
}
else
#endif
{
lcd_putsiAtt(x, y, STR_VSWITCHES, SWSRC_TRAINER-1, att);
}
return lcd_putcAtt(lcdLastPos, y, suffix, att);
}
#endif
if (idx > SWSRC_ON) {
idx -= SWSRC_ON;
if (idx != SWSRC_ON && (~att & STRCONDENSED)) {
lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att);
return lcd_putcAtt(lcdLastPos, y, CHR_TOGGLE, att);
}
}
lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att);
}
@ -1141,22 +1106,15 @@ void putsCurve(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
}
#endif
void putsTmrMode(xcoord_t x, uint8_t y, int8_t mode, LcdFlags att)
void putsTimerMode(xcoord_t x, uint8_t y, int8_t mode, LcdFlags att)
{
if (mode < 0) {
mode = TMR_VAROFS - mode - 1;
lcd_putcAtt(x-1*FW, y, '!', att);
if (mode >= 0) {
if (mode < TMR_VAROFS)
return lcd_putsiAtt(x, y, STR_VTMRMODES, mode, att);
else
mode -= (TMR_VAROFS-1);
}
else if (mode < TMR_VAROFS) {
lcd_putsiAtt(x, y, STR_VTMRMODES, mode, att);
return;
}
if (mode >= TMR_VAROFS+NUM_PSWITCH+NUM_CSW) {
mode++;
}
putsSwitches(x, y, mode-(TMR_VAROFS-1), att);
putsSwitches(x, y, mode, att);
}
#if defined(PCBTARANIS)