refactoring launch

This commit is contained in:
Andrey 2021-11-15 19:24:00 -05:00
parent 4002c92dcc
commit f510cb8b29
1 changed files with 0 additions and 11 deletions

View File

@ -15,8 +15,6 @@
#include "engine_state.h"
#include "advance_map.h"
static bool isInit = false;
/**
* We can have active condition from switch or from clutch.
* In case we are dependent on VSS we just return true.
@ -97,17 +95,10 @@ bool LaunchControlBase::isLaunchConditionMet(int rpm) const {
}
void LaunchControlBase::update() {
if (!CONFIG(launchControlEnabled)) {
return;
}
#if ! EFI_UNIT_TEST
if(!isInit) {
return;
}
#endif
int rpm = GET_RPM();
bool combinedConditions = isLaunchConditionMet(rpm);
float timeDelay = CONFIG(launchActivateDelay);
@ -175,8 +166,6 @@ void LaunchControlBase::applyLaunchControlLimiting(bool *limitedSpark, bool *lim
void initLaunchControl(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
engine->launchController.inject(PASS_ENGINE_PARAMETER_SIGNATURE);
isInit = true;
}
#endif /* EFI_LAUNCH_CONTROL */