little bit of real vvt data

This commit is contained in:
Matthew Kennedy 2023-07-01 21:58:40 -07:00
parent b4ed123d04
commit 75e90b57dc
2 changed files with 6 additions and 1 deletions

View File

@ -58,6 +58,8 @@ expected<angle_t> VvtController::getSetpoint() {
engine->outputChannels.vvtTargets[index] = target;
#endif
vvtTarget = target;
return target;
}
@ -100,6 +102,8 @@ void VvtController::setOutput(expected<percent_t> 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 {

View File

@ -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