From 19fd1f25564ecff91aed093ba15bd5ad99269df4 Mon Sep 17 00:00:00 2001 From: 3djc Date: Sat, 10 Sep 2016 10:40:54 +0200 Subject: [PATCH] Finaly working on X9E, tested both man and auto --- radio/src/opentx.h | 2 +- radio/src/switches.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 70951f67f..03d906a3d 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -302,7 +302,7 @@ void memswap(void * a, void * b, uint8_t size); #define POT_CONFIG(x) ((g_eeGeneral.potsConfig >> (2*((x)-POT1)))&0x03) #define IS_POT_MULTIPOS(x) (IS_POT(x) && POT_CONFIG(x)==POT_MULTIPOS_SWITCH) #define IS_POT_WITHOUT_DETENT(x) (IS_POT(x) && POT_CONFIG(x)==POT_WITHOUT_DETENT) - #define IS_SLIDER_AVAILABLE(x) ((x) == SLIDER1 || (x) == SLIDER2 || (IS_SLIDER(x) && (g_eeGeneral.slidersConfig & (0x01 << ((x)-SLIDER1))))) + #define IS_SLIDER_AVAILABLE(x) ((x) == SLIDER1 || (x) == SLIDER2 || (IS_SLIDER(x) && (g_eeGeneral.slidersConfig & (0x01 << ((x)-SLIDER3))))) #define IS_POT_AVAILABLE(x) (IS_POT(x) && POT_CONFIG(x)!=POT_NONE) #define IS_POT_OR_SLIDER_AVAILABLE(x) (IS_POT_AVAILABLE(x) || IS_SLIDER_AVAILABLE(x)) #define IS_MULTIPOS_CALIBRATED(cal) (cal->count>0 && cal->count 1)) { @@ -859,11 +859,10 @@ void checkSwitches() x = 60; } for (int i=0; i 1) ? "FAIL" : "PASS"); if (abs(g_model.potsWarnPosition[i] - GET_LOWRES_POT_POSITION(i)) > 1) { #if defined(COLORLCD) char s[8];