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