mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +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));
|
||||
|
||||
// autodetect cell count, going from 2S..6S
|
||||
for (i = 2; i < 6; i++) {
|
||||
for (i = 1; i < 6; i++) {
|
||||
if (voltage < i * batteryConfig->vbatmaxcellvoltage)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue