test_check_delay

This commit is contained in:
Janosch
2022-10-11 13:28:13 +01:00
parent e54de68605
commit 8e61ddd188
7 changed files with 34 additions and 8 deletions
+9
View File
@@ -81,6 +81,15 @@ bool CheckTimeout()
return timeout > 0 && (now - startTime) > timeout;
}
bool CheckDelay()
{
uint32_t now = rtc_get_counter_val();
uint32_t start = Param::GetInt(Param::timedly) * 60;
return start <= 0 || (now - startTime) > start;
}
void EvseRead()
{
const int threshProxType1 = 2200;
-8
View File
@@ -93,14 +93,6 @@ static bool CheckChargerFaults()
(active3 && ((Param::GetInt(Param::c3flag) & FLAG_FAULT) || timeouts[2]));
}
static bool CheckDelay()
{
uint32_t now = rtc_get_counter_val();
uint32_t start = Param::GetInt(Param::timedly) * 60;
return start <= 0 || (now - startTime) > start;
}
static void CalcAcCurrentLimit()
{
int configuredChargers = Param::GetInt(Param::chargerena);