test CheckVoltage
This commit is contained in:
@@ -54,6 +54,23 @@ bool CheckStartCondition()
|
||||
(!IsEvseInput() && Param::GetBool(Param::enable));
|
||||
}
|
||||
|
||||
bool CheckVoltage()
|
||||
{
|
||||
static int timeout = 0;
|
||||
|
||||
if (Param::Get(Param::udc) > Param::Get(Param::udclim))
|
||||
{
|
||||
timeout++;
|
||||
}
|
||||
else
|
||||
{
|
||||
timeout = 0;
|
||||
}
|
||||
|
||||
return timeout > 10;
|
||||
}
|
||||
|
||||
|
||||
bool CheckTimeout()
|
||||
{
|
||||
uint32_t now = rtc_get_counter_val();
|
||||
|
||||
@@ -48,23 +48,6 @@ static Can* can;
|
||||
static PiController dcCurController;
|
||||
uint32_t startTime;
|
||||
|
||||
|
||||
static bool CheckVoltage()
|
||||
{
|
||||
static int timeout = 0;
|
||||
|
||||
if (Param::Get(Param::udc) > Param::Get(Param::udclim))
|
||||
{
|
||||
timeout++;
|
||||
}
|
||||
else
|
||||
{
|
||||
timeout = 0;
|
||||
}
|
||||
|
||||
return timeout > 10;
|
||||
}
|
||||
|
||||
static bool CheckChargerFaults()
|
||||
{
|
||||
const int acPresentThresh = 70;
|
||||
|
||||
Reference in New Issue
Block a user