mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Update BYD-MODBUS-2-LEAF-CAN.ino
I think you got this wrong regarding the charge and discharge limits
This commit is contained in:
parent
a84add2d9f
commit
4179ad5f9f
1 changed files with 7 additions and 7 deletions
|
@ -182,9 +182,9 @@ void update_values_leaf_battery()
|
|||
{
|
||||
max_target_discharge_power = (LB_Discharge_Power_Limit * 1000); //kW to W
|
||||
}
|
||||
if(SOC == 10000) //Scaled SOC% value is 100.00%
|
||||
if(SOC == 0) //Scaled SOC% value is 0.00%, we should not discharge battery further
|
||||
{
|
||||
max_target_discharge_power = 0; //No need to charge further, set max power to 0
|
||||
max_target_discharge_power = 0;
|
||||
}
|
||||
|
||||
/* Define power able to be put into the battery */
|
||||
|
@ -200,9 +200,9 @@ void update_values_leaf_battery()
|
|||
{
|
||||
max_target_charge_power = (LB_MAX_POWER_FOR_CHARGER * 1000); //kW to W
|
||||
}
|
||||
if(SOC == 0) //Scaled SOC% value is 0.00%, we should not discharge battery further
|
||||
if(SOC == 10000) //Scaled SOC% value is 100.00%
|
||||
{
|
||||
max_target_charge_power = 0;
|
||||
max_target_charge_power = 0; //No need to charge further, set max power to 0
|
||||
}
|
||||
|
||||
LB_Power = LB_Total_Voltage * LB_Current;//P = U * I
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue