Fixes #2581: symbols for renamed physical inputs were missing

This commit is contained in:
Damjan Adamic
2015-07-27 21:24:51 +02:00
parent 545f54a89c
commit 1da0f157de
3 changed files with 27 additions and 16 deletions
+1
View File
@@ -17,6 +17,7 @@
<li>Fixed missing option in the sensor setup menu (<a href=https://github.com/opentx/opentx/issues/2533>#2533</a>)</li>
<li>Fixed several VFAS issues when using D series sensors (<a href=https://github.com/opentx/opentx/issues/2518>#2518</a>, <a href=https://github.com/opentx/opentx/issues/2531>#2531</a>)</li>, <a href=https://github.com/opentx/opentx/issues/2530>#2530</a>)</li>
<li>Fixed missing GPS altitude when using D series sensors (<a href=https://github.com/opentx/opentx/issues/2539>#2539</a>)</li>
<li>Symbols for renamed physical inputs were not shown (<a href=https://github.com/opentx/opentx/issues/2581>#2581</a>)</li>
</ul>
[Boards with narrow LCD (9X, 9XR, etc)]
+13 -4
View File
@@ -662,15 +662,24 @@ void putsMixerSource(coord_t x, coord_t y, uint32_t idx, LcdFlags att)
else if (idx < MIXSRC_LAST_POT) {
idx = idx-MIXSRC_Rud;
if (ZEXIST(g_eeGeneral.anaNames[idx]))
lcd_putsnAtt(x, y, g_eeGeneral.anaNames[idx], LEN_ANA_NAME, ZCHAR|att);
if (ZEXIST(g_eeGeneral.anaNames[idx])) {
if (idx < MIXSRC_FIRST_POT-MIXSRC_Rud )
lcd_putcAtt(x, y, '\307', att); //stick symbol
else if (idx < MIXSRC_FIRST_SLIDER-MIXSRC_Rud )
lcd_putcAtt(x, y, '\310', att); //pot symbol
else
lcd_putcAtt(x, y, '\311', att); //slider symbol
lcd_putsnAtt(lcdNextPos, y, g_eeGeneral.anaNames[idx], LEN_ANA_NAME, ZCHAR|att);
}
else
lcd_putsiAtt(x, y, STR_VSRCRAW, idx+1, att);
}
else if (idx >= MIXSRC_FIRST_SWITCH && idx < MIXSRC_FIRST_LOGICAL_SWITCH) {
idx = idx-MIXSRC_FIRST_SWITCH;
if (ZEXIST(g_eeGeneral.switchNames[idx]))
lcd_putsnAtt(x, y, g_eeGeneral.switchNames[idx], LEN_SWITCH_NAME, ZCHAR|att);
if (ZEXIST(g_eeGeneral.switchNames[idx])) {
lcd_putcAtt(x, y, '\312', att); //switch symbol
lcd_putsnAtt(lcdNextPos, y, g_eeGeneral.switchNames[idx], LEN_SWITCH_NAME, ZCHAR|att);
}
else
lcd_putsiAtt(x, y, STR_VSRCRAW, idx+MIXSRC_FIRST_SWITCH-MIXSRC_Rud+1, att);
}
+13 -12
View File
@@ -1792,24 +1792,25 @@ enum MixSources {
#endif
MIXSRC_FIRST_STICK,
MIXSRC_Rud = MIXSRC_FIRST_STICK, LUA_EXPORT("rud", "Rudder")
MIXSRC_Ele, LUA_EXPORT("ele", "Elevator")
MIXSRC_Thr, LUA_EXPORT("thr", "Throttle")
MIXSRC_Ail, LUA_EXPORT("ail", "Aileron")
MIXSRC_Rud = MIXSRC_FIRST_STICK, LUA_EXPORT("rud", "Rudder")
MIXSRC_Ele, LUA_EXPORT("ele", "Elevator")
MIXSRC_Thr, LUA_EXPORT("thr", "Throttle")
MIXSRC_Ail, LUA_EXPORT("ail", "Aileron")
MIXSRC_FIRST_POT,
#if defined(PCBTARANIS)
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
MIXSRC_POT2, LUA_EXPORT("s2", "Potentiometer 2")
MIXSRC_POT3, LUA_EXPORT("s3", "Potentiometer 3")
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
MIXSRC_POT2, LUA_EXPORT("s2", "Potentiometer 2")
MIXSRC_POT3, LUA_EXPORT("s3", "Potentiometer 3")
#if defined(REV9E)
MIXSRC_POT4, LUA_EXPORT("s4", "Potentiometer 4")
MIXSRC_POT4, LUA_EXPORT("s4", "Potentiometer 4")
#endif
MIXSRC_SLIDER1, LUA_EXPORT("ls", "Left slider")
MIXSRC_SLIDER2, LUA_EXPORT("rs", "Right slider")
MIXSRC_FIRST_SLIDER,
MIXSRC_SLIDER1 = MIXSRC_FIRST_SLIDER, LUA_EXPORT("ls", "Left slider")
MIXSRC_SLIDER2, LUA_EXPORT("rs", "Right slider")
#if defined(REV9E)
MIXSRC_SLIDER3, LUA_EXPORT("ls2", "Left center slider")
MIXSRC_SLIDER4, LUA_EXPORT("rs2", "Right center slider")
MIXSRC_SLIDER3, LUA_EXPORT("ls2", "Left center slider")
MIXSRC_SLIDER4, LUA_EXPORT("rs2", "Right center slider")
MIXSRC_LAST_POT = MIXSRC_SLIDER4,
#else
MIXSRC_LAST_POT = MIXSRC_SLIDER2,