move launch controller update before updating spark limiters and calculation of advance, because we use launch controller for these operations
This commit is contained in:
parent
fdc60e4bff
commit
c039f64c3c
|
@ -169,6 +169,10 @@ void EngineState::periodicFastCallback() {
|
|||
injectionOffset = getInjectionOffset(rpm, fuelLoad);
|
||||
engine->lambdaMonitor.update(rpm, fuelLoad);
|
||||
|
||||
#if EFI_LAUNCH_CONTROL
|
||||
engine->launchController.update();
|
||||
#endif //EFI_LAUNCH_CONTROL
|
||||
|
||||
float l_ignitionLoad = getIgnitionLoad();
|
||||
float baseAdvance = getAdvance(rpm, l_ignitionLoad) * engine->ignitionState.luaTimingMult + engine->ignitionState.luaTimingAdd;
|
||||
float correctedIgnitionAdvance = baseAdvance
|
||||
|
@ -207,10 +211,6 @@ void EngineState::periodicFastCallback() {
|
|||
|
||||
multispark.count = getMultiSparkCount(rpm);
|
||||
|
||||
#if EFI_LAUNCH_CONTROL
|
||||
engine->launchController.update();
|
||||
#endif //EFI_LAUNCH_CONTROL
|
||||
|
||||
#if EFI_ANTILAG_SYSTEM
|
||||
engine->antilagController.update();
|
||||
#endif //EFI_ANTILAG_SYSTEM
|
||||
|
|
|
@ -45,15 +45,9 @@ static void setUpTestParameters(
|
|||
|
||||
static void updateRpm(const int rpm, EngineTestHelper& eth) {
|
||||
Sensor::setMockValue(SensorType::Rpm, rpm);
|
||||
for (int i = 0; i < 2; i++) {\
|
||||
/*
|
||||
* We need to repeat the following code twice because method EngineState::periodicFastCallback updates launch
|
||||
* controller after updating spark skip - can we fix it safely?
|
||||
*/
|
||||
eth.moveTimeForwardSec(1);
|
||||
// run the ignition math
|
||||
engine->periodicFastCallback();
|
||||
}
|
||||
eth.moveTimeForwardSec(1);
|
||||
// run the ignition math
|
||||
engine->periodicFastCallback();
|
||||
}
|
||||
|
||||
TEST(skipSparkRatio, raisingRpm) {
|
||||
|
|
Loading…
Reference in New Issue