Skip to content

Commit

Permalink
Fixed: Trigger by SoC
Browse files Browse the repository at this point in the history
  • Loading branch information
shining-man committed Apr 1, 2024
1 parent 2a04107 commit 0cc4829
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/AlarmRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@ void rules_soc(Inverter &inverter)

if(inverterData->noBatteryPackOnline==true) //Wenn kein Batterypack online ist, dann zurück
{
//BSC_LOGI(TAG,"No battery online");
u8_merkerHysterese_TriggerAtSoc=0;
return;
}
Expand All @@ -980,7 +981,7 @@ void rules_soc(Inverter &inverter)
{
u8_lTriggerAtSoc_SocOn = WebSettings::getInt(ID_PARAM_TRIGGER_AT_SOC_ON,ruleNr,DT_ID_PARAM_TRIGGER_AT_SOC_ON);
u8_lTriggerAtSoc_SocOff = WebSettings::getInt(ID_PARAM_TRIGGER_AT_SOC_OFF,ruleNr,DT_ID_PARAM_TRIGGER_AT_SOC_OFF);
//BSC_LOGI(TAG,"ruleNr=%i, socOn=%i, socOff=%i, hyst=%i",ruleNr, u8_lTriggerAtSoc_SocOn,u8_lTriggerAtSoc_SocOff,u8_merkerHysterese_TriggerAtSoc);
//BSC_LOGI(TAG,"ruleNr=%i, soc=%i, socOn=%i, socOff=%i, hyst=%i", ruleNr, inverterData->inverterSoc, u8_lTriggerAtSoc_SocOn,u8_lTriggerAtSoc_SocOff,u8_merkerHysterese_TriggerAtSoc);

if(u8_lTriggerAtSoc_SocOn>u8_lTriggerAtSoc_SocOff)
{
Expand Down
2 changes: 1 addition & 1 deletion src/inverter/InverterBattery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace nsInverterBattery
}

inverter.inverterDataSemaphoreTake();
inverterData.noBatteryPackOnline = isOneBatteryPackOnline;
inverterData.noBatteryPackOnline = !isOneBatteryPackOnline;
inverterData.batteryCurrent = u16_lBatteryCurrent;
inverter.inverterDataSemaphoreGive();
}
Expand Down

0 comments on commit 0cc4829

Please sign in to comment.