clutch input via CAN #3605
This commit is contained in:
parent
b3a240f893
commit
31ed18fe84
|
@ -313,17 +313,21 @@ void Engine::updateSlowSensors() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool getClutchUpState() {
|
static bool getClutchUpState() {
|
||||||
|
#if EFI_GPIO_HARDWARE
|
||||||
if (isBrainPinValid(engineConfiguration->clutchUpPin)) {
|
if (isBrainPinValid(engineConfiguration->clutchUpPin)) {
|
||||||
return engineConfiguration->clutchUpPinInverted ^ efiReadPin(engineConfiguration->clutchUpPin);
|
return engineConfiguration->clutchUpPinInverted ^ efiReadPin(engineConfiguration->clutchUpPin);
|
||||||
}
|
}
|
||||||
|
#endif // EFI_GPIO_HARDWARE
|
||||||
return engine->engineState.luaAdjustments.clutchUpState;
|
return engine->engineState.luaAdjustments.clutchUpState;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool getBrakePedalState() {
|
static bool getBrakePedalState() {
|
||||||
|
#if EFI_GPIO_HARDWARE
|
||||||
if (isBrainPinValid(engineConfiguration->throttlePedalUpPin)) {
|
if (isBrainPinValid(engineConfiguration->throttlePedalUpPin)) {
|
||||||
return efiReadPin(engineConfiguration->brakePedalPin);
|
return efiReadPin(engineConfiguration->brakePedalPin);
|
||||||
}
|
}
|
||||||
return engine->engineState.luaAdjustments.brakePedalState;
|
return engine->engineState.luaAdjustments.brakePedalState;
|
||||||
|
#endif // EFI_GPIO_HARDWARE
|
||||||
}
|
}
|
||||||
|
|
||||||
void Engine::updateSwitchInputs() {
|
void Engine::updateSwitchInputs() {
|
||||||
|
|
Loading…
Reference in New Issue