1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

hardware divider supports up to 8S, make it so in the code as well.

This commit is contained in:
dongie 2014-05-26 20:24:14 +09:00
parent b32cc09e12
commit 09b7268ec1

View file

@ -155,8 +155,8 @@ void batteryInit(void)
voltage = batteryAdcToVoltage((uint16_t)(voltage / 32));
// autodetect cell count, going from 2S..6S
for (i = 1; i < 6; i++) {
// autodetect cell count, going from 2S..8S
for (i = 1; i < 8; i++) {
if (voltage < i * mcfg.vbatmaxcellvoltage)
break;
}