Sanitization
This commit is contained in:
@@ -324,7 +324,7 @@ uint16_t getBatteryVoltage()
|
||||
{
|
||||
int32_t instant_vbat = anaIn(TX_VOLTAGE); // using filtered ADC value on purpose
|
||||
instant_vbat = (instant_vbat * BATT_SCALE * (128 + g_eeGeneral.txVoltageCalibration) ) / 26214;
|
||||
instant_vbat += 20; // add 0.2V because of the diode TODO check if this is needed, but removal will beak existing calibrations!!!
|
||||
instant_vbat += 20; // add 0.2V because of the diode TODO check if this is needed, but removal will break existing calibrations!
|
||||
return (uint16_t)instant_vbat;
|
||||
}
|
||||
|
||||
|
||||
@@ -565,6 +565,7 @@ extern uint16_t adcValues[NUM_ANALOGS];
|
||||
#define BATTERY_MIN 60 // 6.0V
|
||||
#define BATTERY_MAX 80 // 8.0V
|
||||
#endif
|
||||
|
||||
#if defined(PCBXLITE)
|
||||
#define BATT_SCALE 131
|
||||
#elif defined(PCBX7)
|
||||
|
||||
Reference in New Issue
Block a user