test CheckStartCondition

This commit is contained in:
Janosch
2022-10-11 12:12:07 +01:00
parent 7a3dd9fb89
commit 7481f0f7e8
7 changed files with 63 additions and 5 deletions
+6
View File
@@ -48,6 +48,12 @@ void CalcTotals()
Param::SetFixed(Param::udc, udcmax);
}
bool CheckStartCondition()
{
return (IsEvseInput() && Param::GetBool(Param::proximity) && Param::Get(Param::cablelim) > FP_FROMFLT(1.4) && Param::GetBool(Param::enable)) ||
(!IsEvseInput() && Param::GetBool(Param::enable));
}
bool CheckTimeout()
{
uint32_t now = rtc_get_counter_val();
-5
View File
@@ -48,11 +48,6 @@ static Can* can;
static PiController dcCurController;
uint32_t startTime;
static bool CheckStartCondition()
{
return (IsEvseInput() && Param::GetBool(Param::proximity) && Param::Get(Param::cablelim) > FP_FROMFLT(1.4) && Param::GetBool(Param::enable)) ||
(!IsEvseInput() && Param::GetBool(Param::enable));
}
static bool CheckVoltage()
{