mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
support 1S battery for voltage monitoring
Conflicts: src/sensors.c
This commit is contained in:
parent
78a335792d
commit
65ba0fdf30
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ void batteryInit(batteryConfig_t *initialBatteryConfig)
|
||||||
voltage = batteryAdcToVoltage((uint16_t)(voltage / 32));
|
voltage = batteryAdcToVoltage((uint16_t)(voltage / 32));
|
||||||
|
|
||||||
// autodetect cell count, going from 2S..6S
|
// autodetect cell count, going from 2S..6S
|
||||||
for (i = 2; i < 6; i++) {
|
for (i = 1; i < 6; i++) {
|
||||||
if (voltage < i * batteryConfig->vbatmaxcellvoltage)
|
if (voltage < i * batteryConfig->vbatmaxcellvoltage)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue