TLE8888 should be re-initialized every time we get +12 volts #901

extremely ugly solution but it it works at least with LED blinking test
This commit is contained in:
rusefi 2019-08-16 23:00:28 -04:00
parent 51902c12c5
commit f858b26a50
1 changed files with 9 additions and 0 deletions

View File

@ -128,6 +128,10 @@ void Engine::periodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
}
#if (BOARD_TLE8888_COUNT > 0)
extern float vBattForTle8888;
#endif /* BOARD_TLE8888_COUNT */
/**
* We are executing these heavy (logarithm) methods from outside the trigger callbacks for performance reasons.
* See also periodicFastCallback
@ -149,6 +153,11 @@ void Engine::updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
}
sensors.vBatt = hasVBatt(PASS_ENGINE_PARAMETER_SIGNATURE) ? getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE) : 12;
#if (BOARD_TLE8888_COUNT > 0)
// nasty value injection into C driver which would not be able to access Engine class
vBattForTle8888 = sensors.vBatt;
#endif /* BOARD_TLE8888_COUNT */
engineState.injectorLag = getInjectorLag(sensors.vBatt PASS_ENGINE_PARAMETER_SUFFIX);
#endif
}