From 15723cdd864fe1dc64d004cf128726a243986971 Mon Sep 17 00:00:00 2001 From: BlakeFreer Date: Tue, 2 Apr 2024 22:37:18 -0400 Subject: [PATCH] reorders Fan functions --- firmware/projects/TMS/inc/app.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/projects/TMS/inc/app.h b/firmware/projects/TMS/inc/app.h index 41b7bff39..3be70b28a 100644 --- a/firmware/projects/TMS/inc/app.h +++ b/firmware/projects/TMS/inc/app.h @@ -90,6 +90,11 @@ class FanContoller { temp_to_power_(temp_to_power), pwm_step_size_(pwm_step_size) {} + void Start(float initial_power) { + pwm_.Start(); + pwm_.SetDutyCycle(power_to_pwm_.Evaluate(initial_power)); + } + void Update(float temperature) { // convert pwm = 100 - power since the fan runs on inverse logic // ex. pwm=20% => fan is running at 80% @@ -104,11 +109,6 @@ class FanContoller { pwm_.SetDutyCycle(current_pwm + pwm_step); } - void Start(float initial_power) { - pwm_.Start(); - pwm_.SetDutyCycle(power_to_pwm_.Evaluate(initial_power)); - } - private: shared::periph::PWMOutput& pwm_;