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:
commit
35de1c8229
3 changed files with 11 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue