Trigger: Question: something strange trigger errors #662

hopefully CUSTOM_ERR_START_STACK fix
This commit is contained in:
rusefi 2019-01-14 08:57:08 -05:00
parent 2bbc5feef4
commit 4b72599e2f
5 changed files with 9 additions and 3 deletions

View File

@ -375,6 +375,7 @@ public:
bool isAlternatorControlEnabled;
bool isCltBroken;
bool slowCallBackWasInvoked = false;
// floatms_t callToPitEndTime;

View File

@ -120,6 +120,9 @@ void EngineState::updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
}
void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
if (!engine->slowCallBackWasInvoked) {
warning(CUSTOM_ERR_6696, "Slow not invoked yet");
}
efitick_t nowNt = getTimeNowNt();
if (ENGINE(rpmCalculator).isCranking(PASS_ENGINE_PARAMETER_SIGNATURE)) {
crankingTime = nowNt;

View File

@ -291,7 +291,6 @@ static void invokePerSecond(void) {
}
static void periodicSlowCallback(Engine *engine) {
efiAssertVoid(CUSTOM_ERR_6661, getRemainingStack(chThdGetSelfX()) > 64, "lowStckOnEv");
#if EFI_PROD_CODE
@ -339,11 +338,12 @@ static void periodicSlowCallback(Engine *engine) {
cylinderCleanupControl(engine);
engine->slowCallBackWasInvoked = TRUE;
scheduleNextSlowInvocation();
}
void initPeriodicEvents(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
scheduleNextSlowInvocation();
periodicSlowCallback(engine);
periodicFastCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
}

View File

@ -109,7 +109,7 @@ GTEST_API_ int main(int argc, char **argv) {
// printConvertedTable();
testing::InitGoogleTest(&argc, argv);
// uncomment if you only want to run selected tests
//::testing::GTEST_FLAG(filter) = "hip*";
//::testing::GTEST_FLAG(filter) = "*testFasterEngineSpinningUp*";
return RUN_ALL_TESTS();
}

View File

@ -12,6 +12,8 @@ extern int timeNowUs;
TEST(sensors, testFasterEngineSpinningUp) {
printf("*************************************************** testFasterEngineSpinningUp\r\n");
timeNowUs = 0;
EngineTestHelper eth(TEST_ENGINE);
EXPAND_EngineTestHelper