no message
This commit is contained in:
@@ -416,8 +416,14 @@ class Bat_EV_SDL_V4 extends IPSModule
|
|||||||
$sdlStartPct = max(0.0, min(100.0, (float)$this->ReadPropertyFloat("SDL_Start_Pos_Config")));
|
$sdlStartPct = max(0.0, min(100.0, (float)$this->ReadPropertyFloat("SDL_Start_Pos_Config")));
|
||||||
$evStartPct = max(0.0, min(100.0, (float)$this->ReadPropertyFloat("EV_Start_Pos_Config")));
|
$evStartPct = max(0.0, min(100.0, (float)$this->ReadPropertyFloat("EV_Start_Pos_Config")));
|
||||||
|
|
||||||
$eSDL = ($sdlTotal > 0.0) ? $sdlTotal * $sdlStartPct / 100.0 : 0.0;
|
$lastSdlPct = (float)GetValue($this->GetIDForIdent("SDL_Pos"));
|
||||||
$eEV = ($evTotal > 0.0) ? $evTotal * $evStartPct / 100.0 : 0.0;
|
$lastEvPct = (float)GetValue($this->GetIDForIdent("SoC_EV"));
|
||||||
|
|
||||||
|
$lastSdlPct = max(0.0, min(100.0, $lastSdlPct));
|
||||||
|
$lastEvPct = max(0.0, min(100.0, $lastEvPct));
|
||||||
|
|
||||||
|
$eSDL = ($sdlTotal > 0.0) ? $sdlTotal * $lastSdlPct / 100.0 : 0.0;
|
||||||
|
$eEV = ($evTotal > 0.0) ? $evTotal * $lastEvPct / 100.0 : 0.0;
|
||||||
|
|
||||||
$this->SetBuffer("Int_E_SDL_kWh", (string)$eSDL);
|
$this->SetBuffer("Int_E_SDL_kWh", (string)$eSDL);
|
||||||
$this->SetBuffer("Int_E_EV_kWh", (string)$eEV);
|
$this->SetBuffer("Int_E_EV_kWh", (string)$eEV);
|
||||||
|
|||||||
Reference in New Issue
Block a user