From ee366ce3b59180f079efea6bcdb42a253fd5b516 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 13 Jul 2018 19:18:54 +0200 Subject: [PATCH] Fix compiler warnings: In file included from sketch/ConfigurationStore.cpp:3:0: sketch/temperature.h:193:14: warning: 'temp_runaway_status' defined but not used [-Wunused-variable] static float temp_runaway_status[4]; ^ sketch/temperature.h:194:14: warning: 'temp_runaway_target' defined but not used [-Wunused-variable] static float temp_runaway_target[4]; ^ sketch/temperature.h:195:14: warning: 'temp_runaway_timer' defined but not used [-Wunused-variable] static float temp_runaway_timer[4]; ^ sketch/temperature.h:196:12: warning: 'temp_runaway_error_counter' defined but not used [-Wunused-variable] static int temp_runaway_error_counter[4]; --- Firmware/temperature.cpp | 10 ++++++++++ Firmware/temperature.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 0d7c6a3b..cf9cccfd 100644 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -205,6 +205,16 @@ unsigned long watchmillis[EXTRUDERS] = ARRAY_BY_EXTRUDERS(0,0,0); //============================= functions ============================ //=========================================================================== +#if (defined (TEMP_RUNAWAY_BED_HYSTERESIS) && TEMP_RUNAWAY_BED_TIMEOUT > 0) || (defined (TEMP_RUNAWAY_EXTRUDER_HYSTERESIS) && TEMP_RUNAWAY_EXTRUDER_TIMEOUT > 0) +static float temp_runaway_status[4]; +static float temp_runaway_target[4]; +static float temp_runaway_timer[4]; +static int temp_runaway_error_counter[4]; + +static void temp_runaway_check(int _heater_id, float _target_temperature, float _current_temperature, float _output, bool _isbed); +static void temp_runaway_stop(bool isPreheat, bool isBed); +#endif + void PID_autotune(float temp, int extruder, int ncycles) { pid_number_of_cycles = ncycles; diff --git a/Firmware/temperature.h b/Firmware/temperature.h index b20a67cd..462412d3 100644 --- a/Firmware/temperature.h +++ b/Firmware/temperature.h @@ -189,16 +189,6 @@ FORCE_INLINE bool isCoolingBed() { #error Invalid number of extruders #endif -#if (defined (TEMP_RUNAWAY_BED_HYSTERESIS) && TEMP_RUNAWAY_BED_TIMEOUT > 0) || (defined (TEMP_RUNAWAY_EXTRUDER_HYSTERESIS) && TEMP_RUNAWAY_EXTRUDER_TIMEOUT > 0) -static float temp_runaway_status[4]; -static float temp_runaway_target[4]; -static float temp_runaway_timer[4]; -static int temp_runaway_error_counter[4]; - -void temp_runaway_check(int _heater_id, float _target_temperature, float _current_temperature, float _output, bool _isbed); -void temp_runaway_stop(bool isPreheat, bool isBed); -#endif - int getHeaterPower(int heater); void disable_heater(); void setWatch();