Finaly working on X9E, tested both man and auto

This commit is contained in:
3djc
2016-09-10 10:40:54 +02:00
parent 77010ee7e3
commit 19fd1f2556
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -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<XPOTS_MULTIPOS_COUNT)
+2 -3
View File
@@ -775,7 +775,7 @@ void checkSwitches()
evalFlightModeMixes(e_perout_mode_normal, 0);
bad_pots = 0;
for (int i=0; i<NUM_POTS+NUM_SLIDERS; i++) {
if (!IS_POT_OR_SLIDER_AVAILABLE(i)) {
if (!IS_POT_OR_SLIDER_AVAILABLE(POT1+i)) {
continue;
}
if (!(g_model.potsWarnEnabled & (1 << i)) && (abs(g_model.potsWarnPosition[i] - GET_LOWRES_POT_POSITION(i)) > 1)) {
@@ -859,11 +859,10 @@ void checkSwitches()
x = 60;
}
for (int i=0; i<NUM_POTS+NUM_SLIDERS; i++) {
if (!IS_POT_OR_SLIDER_AVAILABLE(i)) {
if (!IS_POT_OR_SLIDER_AVAILABLE(POT1+i)) {
continue;
}
if (!(g_model.potsWarnEnabled & (1 << i))) {
TRACE("POT:%d WANT:%d GOT:%d STATUS:%s", i, g_model.potsWarnPosition[i],GET_LOWRES_POT_POSITION(i), (abs(g_model.potsWarnPosition[i] - GET_LOWRES_POT_POSITION(i)) > 1) ? "FAIL" : "PASS");
if (abs(g_model.potsWarnPosition[i] - GET_LOWRES_POT_POSITION(i)) > 1) {
#if defined(COLORLCD)
char s[8];