mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
hardware divider supports up to 8S, make it so in the code as well.
This commit is contained in:
parent
b32cc09e12
commit
09b7268ec1
1 changed files with 2 additions and 2 deletions
|
@ -155,8 +155,8 @@ void batteryInit(void)
|
||||||
|
|
||||||
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..8S
|
||||||
for (i = 1; i < 6; i++) {
|
for (i = 1; i < 8; i++) {
|
||||||
if (voltage < i * mcfg.vbatmaxcellvoltage)
|
if (voltage < i * mcfg.vbatmaxcellvoltage)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue