[X9D] REV3 voltage regression (I already forgot the REV3!!!). Thanks Mike!
This commit is contained in:
+1
-1
@@ -3441,7 +3441,7 @@ void perMain()
|
||||
counter = 10;
|
||||
#if defined(PCBX9D)
|
||||
int32_t instant_vbat = anaIn(TX_VOLTAGE);
|
||||
instant_vbat = ( instant_vbat + instant_vbat*(g_eeGeneral.vBatCalib)/128 ) * 150 ;
|
||||
instant_vbat = ( instant_vbat + instant_vbat*(g_eeGeneral.vBatCalib)/128 ) * BATT_SCALE;
|
||||
instant_vbat >>= 11;
|
||||
#elif defined(PCBSKY9X)
|
||||
int32_t instant_vbat = anaIn(TX_VOLTAGE);
|
||||
|
||||
@@ -134,6 +134,11 @@ void watchdogInit();
|
||||
void adcInit();
|
||||
void adcRead();
|
||||
extern volatile uint16_t Analog_values[];
|
||||
#if defined(REV3)
|
||||
#define BATT_SCALE 120
|
||||
#else
|
||||
#define BATT_SCALE 150
|
||||
#endif
|
||||
|
||||
// Power driver
|
||||
void pwrInit();
|
||||
|
||||
Reference in New Issue
Block a user