launch control live data
This commit is contained in:
rusefillc 2022-01-24 20:58:21 -05:00
parent 16ac447e4d
commit 383d6f87ab
2 changed files with 8 additions and 6 deletions

View File

@ -21,8 +21,11 @@
* In case we are dependent on VSS we just return true. * In case we are dependent on VSS we just return true.
*/ */
bool LaunchControlBase::isInsideSwitchCondition() { bool LaunchControlBase::isInsideSwitchCondition() {
switch (engineConfiguration->launchActivationMode) { isSwitchActivated = engineConfiguration->launchActivationMode == SWITCH_INPUT_LAUNCH;
case SWITCH_INPUT_LAUNCH: isClutchActivated = engineConfiguration->launchActivationMode == CLUTCH_INPUT_LAUNCH;
if (isSwitchActivated) {
#if !EFI_SIMULATOR #if !EFI_SIMULATOR
if (isBrainPinValid(engineConfiguration->launchActivatePin)) { if (isBrainPinValid(engineConfiguration->launchActivatePin)) {
//todo: we should take into consideration if this sw is pulled high or low! //todo: we should take into consideration if this sw is pulled high or low!
@ -30,15 +33,13 @@ bool LaunchControlBase::isInsideSwitchCondition() {
} }
#endif // EFI_PROD_CODE #endif // EFI_PROD_CODE
return launchActivatePinState; return launchActivatePinState;
} else if (isClutchActivated) {
case CLUTCH_INPUT_LAUNCH:
if (isBrainPinValid(engineConfiguration->clutchDownPin)) { if (isBrainPinValid(engineConfiguration->clutchDownPin)) {
return engine->clutchDownState; return engine->clutchDownState;
} else { } else {
return false; return false;
} }
} else {
default:
// ALWAYS_ACTIVE_LAUNCH // ALWAYS_ACTIVE_LAUNCH
return true; return true;
} }

View File

@ -7,6 +7,7 @@ bit launchActivatePinState
bit isLaunchCondition bit isLaunchCondition
bit isSwitchActivated bit isSwitchActivated
bit isClutchActivated bit isClutchActivated
bit isValidInputPin
bit activateSwitchCondition; bit activateSwitchCondition;
bit rpmCondition; bit rpmCondition;