[Taranis] VBatt += 0.2v because of the diode, this time at the right places ;)

This commit is contained in:
bernet.andre@gmail.com
2013-05-13 20:37:49 +00:00
parent 59b26ad36c
commit ed268ff085
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -3673,11 +3673,11 @@ void perMain()
int32_t instant_vbat = anaIn(TX_VOLTAGE);
instant_vbat = ( instant_vbat + instant_vbat*(g_eeGeneral.vBatCalib)/128 ) * BATT_SCALE;
instant_vbat >>= 11;
instant_vbat += 2; // because of the diode
#elif defined(PCBSKY9X)
int32_t instant_vbat = anaIn(TX_VOLTAGE);
instant_vbat = ( instant_vbat + instant_vbat*(g_eeGeneral.vBatCalib)/128 ) * 4191;
instant_vbat /= 55296;
instant_vbat += 2; // because of the diode
#elif defined(PCBGRUVIN9X)
uint16_t instant_vbat = anaIn(TX_VOLTAGE);
instant_vbat = ((uint32_t)instant_vbat*1112 + (int32_t)instant_vbat*g_eeGeneral.vBatCalib + (BandGap<<2)) / (BandGap<<3);