fix(taranis): battery voltage computation (#6166)
This commit is contained in:
@@ -68,8 +68,8 @@ uint16_t getRTCBatteryVoltage()
|
|||||||
#elif defined(BATT_SCALE)
|
#elif defined(BATT_SCALE)
|
||||||
// defined as a simple ratio (old style: mostly taranis targets)
|
// defined as a simple ratio (old style: mostly taranis targets)
|
||||||
#define VBAT_DIVIDER \
|
#define VBAT_DIVIDER \
|
||||||
(((float)BATT_SCALE * (float)ADC_MAX_FILTERED) / \
|
(((float)BATT_SCALE * 128.0 * (float)ADC_MAX_FILTERED) / \
|
||||||
((float)BATTERY_DIVIDER * VREF_FLOAT))
|
((float)BATTERY_DIVIDER * 100.0 * VREF_FLOAT))
|
||||||
|
|
||||||
// Scale of Vbat calibration setting
|
// Scale of Vbat calibration setting
|
||||||
#define VBAT_CAL 128.0
|
#define VBAT_CAL 128.0
|
||||||
|
|||||||
Reference in New Issue
Block a user