Updates to allow sticks to be reversed at compile time.

e.g.
make PCB=SKY9X FRSKY=YES HAPTIC=YES AUDIO=YES STICK_AIL_REV=YES STICK_THR_REV=YES STICK_RUD_REV=YES
This commit is contained in:
rob@marotori.com
2013-09-20 10:29:45 +00:00
parent dc29a32f02
commit bbb2b25ac8
2 changed files with 49 additions and 0 deletions
+28
View File
@@ -2265,8 +2265,36 @@ BeepANACenter evalSticks(uint8_t mode)
v = -v;
#endif
#if defined(STICK_THR_REV)
v = -v;
if (g_model.throttleReversed && ch==THR_STICK)
v = +v;
#else
//normal stick operation but reveresed in model config
if (g_model.throttleReversed && ch==THR_STICK)
v = -v;
#endif
#if defined(STICK_AIL_REV)
if (ch==AIL_STICK)
v = -v;
#endif
#if defined(STICK_ELE_REV)
if (ch==ELE_STICK)
v = -v;
#endif
#if defined(STICK_RUD_REV)
if (ch==RUD_STICK)
v = -v;
#endif
/* end rob hack */
#if defined(EXTRA_3POS)
if (i == POT1+EXTRA_3POS-1) {