fix! (#673)
This commit is contained in:
parent
7ad94ccdc1
commit
775775e4fd
|
@ -603,7 +603,6 @@ uint32_t findTriggerZeroEventIndex(TriggerState *state, TriggerShape * shape,
|
|||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
efiAssert(CUSTOM_ERR_ASSERT, getRemainingStack(chThdGetSelfX()) > 128, "findPos", -1);
|
||||
#endif
|
||||
isInitializingTrigger = true;
|
||||
errorDetection.clear();
|
||||
efiAssert(CUSTOM_ERR_ASSERT, state != NULL, "NULL state", -1);
|
||||
|
||||
|
@ -613,6 +612,8 @@ uint32_t findTriggerZeroEventIndex(TriggerState *state, TriggerShape * shape,
|
|||
return 0;
|
||||
}
|
||||
|
||||
isInitializingTrigger = true;
|
||||
|
||||
// todo: should this variable be declared 'static' to reduce stack usage?
|
||||
TriggerStimulatorHelper helper;
|
||||
|
||||
|
|
|
@ -23,12 +23,14 @@ extern float testCltValue;
|
|||
extern float testIatValue;
|
||||
extern engine_configuration_s activeConfiguration;
|
||||
|
||||
EngineTestHelperBase::EngineTestHelperBase() {
|
||||
// todo: make this not a global variable, we need currentTimeProvider interface on engine
|
||||
timeNowUs = 0;
|
||||
}
|
||||
|
||||
EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persistentConfig) {
|
||||
unitTestWarningCodeState.clear();
|
||||
|
||||
// todo: make this not a global variable, we need currentTimeProvider interface on engine
|
||||
timeNowUs = 0;
|
||||
|
||||
testMafValue = 0;
|
||||
memset(&activeConfiguration, 0, sizeof(activeConfiguration));
|
||||
|
||||
|
|
|
@ -13,11 +13,16 @@
|
|||
#include "main_trigger_callback.h"
|
||||
#include "unit_test_framework.h"
|
||||
|
||||
class EngineTestHelperBase
|
||||
{
|
||||
public:
|
||||
EngineTestHelperBase();
|
||||
};
|
||||
|
||||
/**
|
||||
* Mock engine with trigger signal simulation infrastructure
|
||||
*/
|
||||
class EngineTestHelper {
|
||||
class EngineTestHelper : public EngineTestHelperBase {
|
||||
public:
|
||||
EngineTestHelper(engine_type_e engineType);
|
||||
void applyTriggerShape();
|
||||
|
|
Loading…
Reference in New Issue