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

Switches configuration + Switches/Pots/Sliders/Sticks custom names

This commit is contained in:
bsongis 2014-10-29 07:08:02 +01:00
parent 59d72f93ce
commit 06437b2954
14 changed files with 660 additions and 144 deletions

View file

@ -310,6 +310,12 @@ getvalue_t getValue(mixsrc_t i)
else if (i==MIXSRC_SF) return (switchState(SW_SF0) ? -1024 : 1024);
else if (i==MIXSRC_SG) return (switchState(SW_SG0) ? -1024 : (switchState(SW_SG1) ? 0 : 1024));
else if (i==MIXSRC_SH) return (switchState(SW_SH0) ? -1024 : 1024);
else if (i==MIXSRC_SI) return (switchState(SW_SI0) ? -1024 : 1024);
else if (i==MIXSRC_SJ) return (switchState(SW_SJ0) ? -1024 : 1024);
else if (i==MIXSRC_SK) return (switchState(SW_SK0) ? -1024 : 1024);
else if (i==MIXSRC_SL) return (switchState(SW_SL0) ? -1024 : 1024);
else if (i==MIXSRC_SM) return (switchState(SW_SM0) ? -1024 : 1024);
else if (i==MIXSRC_SN) return (switchState(SW_SN0) ? -1024 : 1024);
#else
else if (i==MIXSRC_3POS) return (getSwitch(SW_ID0-SW_BASE+1) ? -1024 : (getSwitch(SW_ID1-SW_BASE+1) ? 0 : 1024));
// don't use switchState directly to give getSwitch possibility to hack values if needed for switch warning