Projectkk2glider/issue 3432 jitter filter option (#3452)

* Fixes #3432: radio option added to turn on/off ADC jitter filter (ported from master)

* Gtests fix

* Re #3432: compilation fix

* Re #3432: existing field split to accommodate the new option without the RadioData size change
This commit is contained in:
Damjan Adamic
2016-05-02 19:26:08 +02:00
committed by Bertrand Songis
parent 9924695b1d
commit 97cc58e323
25 changed files with 112 additions and 56 deletions
+2
View File
@@ -243,6 +243,7 @@ void adcRead()
const int8_t ana_direction[NUMBER_ANALOG] = {1,-1,1,-1, -1,1,-1, -1,-1, -1,1, 0,0,0};
#if !defined(SIMU)
uint16_t getAnalogValue(uint8_t index)
{
if (ana_direction[index] < 0)
@@ -250,3 +251,4 @@ uint16_t getAnalogValue(uint8_t index)
else
return adcValues[index];
}
#endif // #if !defined(SIMU)
@@ -24,6 +24,11 @@ uint16_t anaIn(uint8_t chan)
return g_anas[chan];
}
uint16_t getAnalogValue(uint8_t index)
{
return anaIn(index);
}
bool hasExtendedTrims()
{
return g_model.extendedTrims;
+2
View File
@@ -136,7 +136,9 @@ void adcRead()
}
#if !defined(SIMU)
uint16_t getAnalogValue(uint8_t value)
{
return adcValues[value];
}
#endif // #if !defined(SIMU)
+2
View File
@@ -173,6 +173,7 @@ void adcStop()
{
}
#if !defined(SIMU)
uint16_t getAnalogValue(uint8_t index)
{
if (IS_POT(index) && !IS_POT_AVAILABLE(index)) {
@@ -189,3 +190,4 @@ uint16_t getAnalogValue(uint8_t index)
else
return adcValues[index];
}
#endif // #if !defined(SIMU)