From 2c80679eb9797b810d58c0e93eb1e0b621351c02 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 8 Mar 2017 22:05:09 +0100 Subject: [PATCH] Also define ana_mppings if horus sticks are used (closes #4565) (#4566) --- radio/src/targets/common/arm/stm32/adc_driver.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/radio/src/targets/common/arm/stm32/adc_driver.cpp b/radio/src/targets/common/arm/stm32/adc_driver.cpp index 295c6d6a5..57543b45f 100644 --- a/radio/src/targets/common/arm/stm32/adc_driver.cpp +++ b/radio/src/targets/common/arm/stm32/adc_driver.cpp @@ -24,10 +24,12 @@ // not needed #elif defined(PCBX10) const int8_t ana_direction[NUM_ANALOGS] = {1,-1,1,-1, -1,-1,-1, -1,1,1,1, -1}; -#elif defined(PCBX9E) && defined(HORUS_STICKS) - const int8_t ana_direction[NUM_ANALOGS] = {1,-1,1,-1, -1,-1,-1,1, -1,1,1,1, -1}; #elif defined(PCBX9E) - const int8_t ana_direction[NUM_ANALOGS] = {1,1,-1,-1, -1,-1,-1,1, -1,1,1,1, -1}; + #if defined(HORUS_STICKS) + const int8_t ana_direction[NUM_ANALOGS] = {1,-1,1,-1, -1,-1,-1,1, -1,1,1,1, -1}; + #else + const int8_t ana_direction[NUM_ANALOGS] = {1,1,-1,-1, -1,-1,-1,1, -1,1,1,1, -1}; + #endif const uint8_t ana_mapping[NUM_ANALOGS] = { 0 /*STICK1*/, 1 /*STICK2*/, 2 /*STICK3*/, 3 /*STICK4*/, 10 /*POT1*/, 4 /*POT2*/, 5 /*POT3*/, 6 /*POT4*/, 11 /*SLIDER1*/, 12 /*SLIDER2*/, 7 /*SLIDER3*/, 8 /*SLIDER4*/,