diff --git a/firmware/boards/f0_module/wideband_board_config.h b/firmware/boards/f0_module/wideband_board_config.h index b71fc989..529dcf9c 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 9bf6eb95..54140766 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 242437ea..5416233e 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)