[X9D] REV3 voltage regression (I already forgot the REV3!!!). Thanks Mike!

This commit is contained in:
bsongis
2013-03-11 20:34:58 +00:00
parent 28bd8e4f07
commit ea148dfcda
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -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);
+5
View File
@@ -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();