From 867082f2769b4d3955d65451c9a5854ac8510198 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Tue, 25 Jun 2024 23:40:39 -0700 Subject: [PATCH] always use the new pump start logic --- firmware/boards/f0_module/wideband_board_config.h | 6 ------ firmware/pump_control.cpp | 5 +---- firmware/wideband_config.h | 6 ++++++ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/firmware/boards/f0_module/wideband_board_config.h b/firmware/boards/f0_module/wideband_board_config.h index b71fc98..529dcf9 100644 --- a/firmware/boards/f0_module/wideband_board_config.h +++ b/firmware/boards/f0_module/wideband_board_config.h @@ -17,9 +17,3 @@ // Nernst voltage & ESR sense // ******************************* #define VM_RESISTOR_VALUE (10) - -// ******************************* -// Hack: allow pump driving above target temperature -// minus this offset to avoid Vnerns voltage clamp near 0V -// ******************************* -#define START_PUMP_TEMP_OFFSET (200.0) diff --git a/firmware/pump_control.cpp b/firmware/pump_control.cpp index 9bf6eb9..5414076 100644 --- a/firmware/pump_control.cpp +++ b/firmware/pump_control.cpp @@ -39,10 +39,7 @@ static void PumpThread(void*) // Only actuate pump when running closed loop! if (heater.IsRunningClosedLoop() || -#ifdef START_PUMP_TEMP_OFFSET - (sampler.GetSensorTemperature() >= heater.GetTargetTemp() - START_PUMP_TEMP_OFFSET) || -#endif - (0)) + (sampler.GetSensorTemperature() >= heater.GetTargetTemp() - START_PUMP_TEMP_OFFSET)) { float nernstVoltage = sampler.GetNernstDc(); diff --git a/firmware/wideband_config.h b/firmware/wideband_config.h index 242437e..5416233 100644 --- a/firmware/wideband_config.h +++ b/firmware/wideband_config.h @@ -48,3 +48,9 @@ #define HEATER_BATTERY_ON_VOLTAGE 9.5 // mininal battery voltage to continue heating #define HEATER_BATTETY_OFF_VOLTAGE 8.5 + +// ******************************* +// Start driving the pump just before we're at target temperature +// minus this offset to avoid Vnerns voltage clamp near 0V +// ******************************* +#define START_PUMP_TEMP_OFFSET (200.0)