From 2628d1d05c4321e21e45b5a5a678104f91ce84c7 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Fri, 23 Jun 2023 14:41:40 -0700 Subject: [PATCH] cycle --- firmware/heater_control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/heater_control.cpp b/firmware/heater_control.cpp index ac35d88..e163923 100644 --- a/firmware/heater_control.cpp +++ b/firmware/heater_control.cpp @@ -282,9 +282,9 @@ void HeaterController::Update(const ISampler& sampler, HeaterAllow heaterAllowSt float duty = voltageRatio * voltageRatio; #ifdef HEATER_MAX_DUTY - s.cycle++; + cycle++; // limit PWM each 10th cycle (2 time per second) to measure heater supply voltage throuth "Heater-" - if ((s.cycle % 10) == 0) { + if ((cycle % 10) == 0) { if (duty > HEATER_MAX_DUTY) { duty = HEATER_MAX_DUTY; }