adding repetitive DigIo mock test

This commit is contained in:
Janosch
2022-10-10 16:46:25 +01:00
parent 624b33ee73
commit a6f275b742
8 changed files with 170 additions and 13 deletions
+16
View File
@@ -1,4 +1,7 @@
#include "../libopeninv/include/params.h"
#ifdef TEST_COMMON_H
#include "../test/digio_mock.h"
#endif
static bool IsEvseInput();
static void DisableAll();
@@ -13,3 +16,16 @@ static bool CheckUnplugged()
{
return IsEvseInput() && !Param::GetBool(Param::proximity);
}
static void DisableAll()
{
DigIo::hvena_out.Clear();
DigIo::acpres_out.Clear();
DigIo::evseact_out.Clear();
DigIo::ch1act_out.Clear();
DigIo::ch2act_out.Clear();
DigIo::ch2act_out.Clear();
DigIo::ch1ena_out.Clear();
DigIo::ch2ena_out.Clear();
DigIo::ch3ena_out.Clear();
}