start/stop button improvements #6483

only: global bad, let's carefully reset
This commit is contained in:
Andrey 2024-05-08 22:49:49 -04:00
parent b86c7b212f
commit 1d249dc4ca
2 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,11 @@ public:
static void startConfigurationList();
static void debug();
bool getPhysicalState();
#if EFI_UNIT_TEST
static void resetForUnitTests() {
s_firstDebounce = nullptr;
}
#endif
private:
const char* const m_name;
efidur_t m_threshold;

View File

@ -34,6 +34,7 @@ EngineTestHelperBase::EngineTestHelperBase(Engine * eng, engine_configuration_s
// todo: make this not a global variable, we need currentTimeProvider interface on engine
setTimeNowUs(0);
minCrankingRpm = 0;
ButtonDebounce::resetForUnitTests();
unitTestBusyWaitHack = false;
EnableToothLogger();
if (engine || engineConfiguration || config) {