1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 09:45:37 +03:00

Merge pull request #10473 from etracer65/battery_min_max_config_validation

Validate that the battery min cell voltage is less than the max cell voltage
This commit is contained in:
Michael Keller 2021-01-16 10:16:40 +08:00 committed by GitHub
commit 35de1c8229
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -96,8 +96,8 @@ PG_REGISTER_WITH_RESET_TEMPLATE(batteryConfig_t, batteryConfig, PG_BATTERY_CONFI
PG_RESET_TEMPLATE(batteryConfig_t, batteryConfig,
// voltage
.vbatmaxcellvoltage = 430,
.vbatmincellvoltage = 330,
.vbatmaxcellvoltage = VBAT_CELL_VOLTAGE_DEFAULT_MAX,
.vbatmincellvoltage = VBAT_CELL_VOLTAGE_DEFAULT_MIN,
.vbatwarningcellvoltage = 350,
.vbatnotpresentcellvoltage = 300, //A cell below 3 will be ignored
.voltageMeterSource = DEFAULT_VOLTAGE_METER_SOURCE,

View file

@ -32,6 +32,8 @@
#define VBAT_CELL_VOTAGE_RANGE_MIN 100
#define VBAT_CELL_VOTAGE_RANGE_MAX 500
#define VBAT_CELL_VOLTAGE_DEFAULT_MIN 330
#define VBAT_CELL_VOLTAGE_DEFAULT_MAX 430
#define MAX_AUTO_DETECT_CELL_COUNT 8