Fix analog input order for sky9x (all flavors except REVA)

This commit is contained in:
Bertrand Songis
2016-11-14 21:42:52 +01:00
parent a46acf09e3
commit 10fe5530f9
+6 -2
View File
@@ -137,8 +137,12 @@ void adcRead()
#if !defined(SIMU) #if !defined(SIMU)
uint16_t getAnalogValue(uint8_t value) uint16_t getAnalogValue(uint8_t index)
{ {
return adcValues[value]; #if defined(PCBSKY9X) && !defined(REVA)
static const uint8_t mapping[] = {1,5,7,0,4,6,2,3};
index = mapping[index];
#endif
return adcValues[index];
} }
#endif // #if !defined(SIMU) #endif // #if !defined(SIMU)