Skip to content

Commit

Permalink
vvt guard
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Nov 3, 2023
1 parent f46ae91 commit 93cf484
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firmware/controllers/actuators/vvt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ expected<percent_t> VvtController::getClosedLoop(angle_t target, angle_t observa
}

void VvtController::setOutput(expected<percent_t> outputValue) {
float rpm = Sensor::getOrZero(SensorType::Rpm);
#if EFI_SHAFT_POSITION_INPUT
float rpm = Sensor::getOrZero(SensorType::Rpm);

bool enabled = rpm > engineConfiguration->vvtControlMinRpm
&& engine->rpmCalculator.getSecondsSinceEngineStart(getTimeNowNt()) > engineConfiguration->vvtActivationDelayMs / MS_PER_SECOND
;
Expand Down

0 comments on commit 93cf484

Please sign in to comment.