This commit is contained in:
rusefi 2020-08-08 20:57:42 -04:00
parent 1ba4dd0dcc
commit c32c8d715d
2 changed files with 7 additions and 0 deletions

View File

@ -188,6 +188,9 @@ void turnInjectionPinLow(InjectionEvent *event) {
}
void InjectionEvent::onTriggerTooth(size_t trgEventIndex, int rpm, efitick_t nowNt) {
// note that here we take 'engineConfiguration' from DECLARE_ENGINE_PTR.
// set engine_type seems to be resetting those references (todo: where exactly? why exactly?) so an event during
// engine_type would not end well
efiAssertVoid(CUSTOM_ERR_ASSERT, engineConfiguration != nullptr, "assert#1");
efiAssertVoid(CUSTOM_ERR_ASSERT, getCurrentRemainingStack() > 128, "assert#2");

View File

@ -75,6 +75,10 @@ public class AutoTest extends BaseTest {
changeRpm(900);
// first let's get to expected RPM
assertRpmDoesNotJump(20000, 15, 30, FAIL, commandQueue);
// important to reduce RPM since high RPM and set engine type do not go well due to DECLARE_ENGINE_PTR
// memset 0?
// todo: safer 'set engine_type' implementation which
changeRpm(120);
}
private void testV12() {