Times can't be negative.

cardreader.cpp needs temperature.h for autotempShutdown() when
AUTOTEMP is defined but warns about unused variables.
Unpublished variables by putting them in to temperature.cpp.
This commit is contained in:
AnHardt 2015-03-30 01:58:46 +02:00
parent 507efa771b
commit 7b2550a604
2 changed files with 17 additions and 16 deletions

View file

@ -83,6 +83,17 @@ unsigned char soft_pwm_bed;
#ifdef FILAMENT_SENSOR #ifdef FILAMENT_SENSOR
int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only int current_raw_filwidth = 0; //Holds measured filament diameter - one extruder only
#endif #endif
#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
static int thermal_runaway_state_machine[4]; // = {0,0,0,0};
static unsigned long thermal_runaway_timer[4]; // = {0,0,0,0};
static bool thermal_runaway = false;
#if TEMP_SENSOR_BED != 0
static int thermal_runaway_bed_state_machine;
static unsigned long thermal_runaway_bed_timer;
#endif
#endif
//=========================================================================== //===========================================================================
//=============================private variables============================ //=============================private variables============================
//=========================================================================== //===========================================================================
@ -1100,8 +1111,8 @@ void disable_heater() {
} }
#ifdef HEATER_0_USES_MAX6675 #ifdef HEATER_0_USES_MAX6675
#define MAX6675_HEAT_INTERVAL 250 #define MAX6675_HEAT_INTERVAL 250u
long max6675_previous_millis = MAX6675_HEAT_INTERVAL; unsigned long max6675_previous_millis = MAX6675_HEAT_INTERVAL;
int max6675_temp = 2000; int max6675_temp = 2000;
static int read_max6675() { static int read_max6675() {

View file

@ -146,16 +146,10 @@ void disable_heater();
void setWatch(); void setWatch();
void updatePID(); void updatePID();
#if defined (THERMAL_RUNAWAY_PROTECTION_PERIOD) && THERMAL_RUNAWAY_PROTECTION_PERIOD > 0 void PID_autotune(float temp, int extruder, int ncycles);
void thermal_runaway_protection(int *state, unsigned long *timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc);
static int thermal_runaway_state_machine[4]; // = {0,0,0,0}; void setExtruderAutoFanState(int pin, bool state);
static unsigned long thermal_runaway_timer[4]; // = {0,0,0,0}; void checkExtruderAutoFans();
static bool thermal_runaway = false;
#if TEMP_SENSOR_BED != 0
static int thermal_runaway_bed_state_machine;
static unsigned long thermal_runaway_bed_timer;
#endif
#endif
FORCE_INLINE void autotempShutdown() { FORCE_INLINE void autotempShutdown() {
#ifdef AUTOTEMP #ifdef AUTOTEMP
@ -167,9 +161,5 @@ FORCE_INLINE void autotempShutdown() {
#endif #endif
} }
void PID_autotune(float temp, int extruder, int ncycles);
void setExtruderAutoFanState(int pin, bool state);
void checkExtruderAutoFans();
#endif #endif