diff --git a/firmware/controllers/actuators/vvt.cpp b/firmware/controllers/actuators/vvt.cpp index aa84625716..75ea2fdcd7 100644 --- a/firmware/controllers/actuators/vvt.cpp +++ b/firmware/controllers/actuators/vvt.cpp @@ -58,6 +58,8 @@ expected VvtController::getSetpoint() { engine->outputChannels.vvtTargets[index] = target; #endif + vvtTarget = target; + return target; } @@ -100,6 +102,8 @@ void VvtController::setOutput(expected outputValue) { && engine->rpmCalculator.getSecondsSinceEngineStart(getTimeNowNt()) > engineConfiguration->vvtActivationDelayMs / MS_PER_SECOND ; + vvtOutput = outputValue.value_or(0); + if (outputValue && enabled) { m_pwm.setSimplePwmDutyCycle(PERCENT_TO_DUTY(outputValue.Value)); } else { diff --git a/firmware/controllers/actuators/vvt.txt b/firmware/controllers/actuators/vvt.txt index 70fef00941..1fab77814c 100644 --- a/firmware/controllers/actuators/vvt.txt +++ b/firmware/controllers/actuators/vvt.txt @@ -1,3 +1,4 @@ struct_no_prefix vvt_s - int vvt_placeholder + uint16_t autoscale vvtTarget;;"deg", 0.1, 0, -90, 90, 1 + uint8_t autoscale vvtOutput;;"%", 0.5, 0, 100, 1 end_struct