Fix default value for discharge current limit
If the default type is an int, setting to a fractional value is not possible. Presumably this is because in `target.DischargeCurrentLimit = source["discharge_current_limit"] | BATTERY_DISCHARGE_CURRENT_LIMIT;` the JSON library uses the default to force the expected type and on type mismatch the default is used. As per https://arduinojson.org/v7/api/jsonvariant/or/: `defaultValue: the value to return if the JsonVariant is null or incompatible with the requested type.`
This commit is contained in:
parent
c523f066b3
commit
2454cead03
@ -155,7 +155,7 @@
|
||||
#define BATTERY_JKBMS_INTERFACE 0
|
||||
#define BATTERY_JKBMS_POLLING_INTERVAL 5
|
||||
#define BATTERY_ENABLE_DISCHARGE_CURRENT_LIMIT false
|
||||
#define BATTERY_DISCHARGE_CURRENT_LIMIT 0
|
||||
#define BATTERY_DISCHARGE_CURRENT_LIMIT 0.0
|
||||
#define BATTERY_USE_BATTERY_REPORTED_DISCHARGE_CURRENT_LIMIT false
|
||||
|
||||
#define HUAWEI_ENABLED false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user