mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Merge pull request #3 from JesperSOGT/patch-1
Update BYD-MODBUS-2-LEAF-CAN.ino
This commit is contained in:
commit
2e3e3e1700
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
|
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 */
|
/* 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
|
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
|
LB_Power = LB_Total_Voltage * LB_Current;//P = U * I
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue