launch control live data
This commit is contained in:
parent
11b8db910e
commit
32c1cd09da
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue