mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-06 03:50:13 +02:00
Change voltage limits to be able to go over 96soc
This commit is contained in:
parent
17bc9eb4db
commit
dbd0d720de
2 changed files with 14 additions and 1 deletions
|
@ -86,6 +86,19 @@ void update_values_battery() { //This function maps all the values fetched via
|
|||
datalayer.battery.status.max_discharge_power_W = 5000; //TODO: Take from CAN
|
||||
|
||||
datalayer.battery.status.max_charge_power_W = 5000; //TODO: Take from CAN
|
||||
// TODO: Remove this hacky wacky scaling down charge power when we find value from CAN
|
||||
if (datalayer.battery.status.real_soc > 9500) {
|
||||
datalayer.battery.status.max_charge_power_W = 3000;
|
||||
}
|
||||
if (datalayer.battery.status.real_soc > 9600) {
|
||||
datalayer.battery.status.max_charge_power_W = 2000;
|
||||
}
|
||||
if (datalayer.battery.status.real_soc > 9700) {
|
||||
datalayer.battery.status.max_charge_power_W = 1000;
|
||||
}
|
||||
if (datalayer.battery.status.real_soc > 9800) {
|
||||
datalayer.battery.status.max_charge_power_W = 500;
|
||||
}
|
||||
|
||||
//Power in watts, Negative = charging batt
|
||||
datalayer.battery.status.active_power_W =
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#define BATTERY_SELECTED
|
||||
|
||||
#define ABSOLUTE_CELL_MAX_VOLTAGE 4150
|
||||
#define ABSOLUTE_CELL_MAX_VOLTAGE 4200
|
||||
#define ABSOLUTE_CELL_MIN_VOLTAGE 3000
|
||||
#define MAX_CELL_DEVIATION_MV 500
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue