heaters-checking update
This commit is contained in:
parent
0eaa4edfee
commit
f09323a78f
|
|
@ -9463,7 +9463,7 @@ bool bInhibitFlag;
|
||||||
{
|
{
|
||||||
#if IR_SENSOR_ANALOG
|
#if IR_SENSOR_ANALOG
|
||||||
bool bTemp=current_voltage_raw_IR>14000; // nahradit prumerem @ vicero hodnot
|
bool bTemp=current_voltage_raw_IR>14000; // nahradit prumerem @ vicero hodnot
|
||||||
bTemp=bTemp&&(target_temperature[0]==0); // & bed (& dalsi extrudery)
|
bTemp=bTemp&&(!CHECK_ALL_HEATERS);
|
||||||
bTemp=bTemp&&(menu_menu==lcd_status_screen);
|
bTemp=bTemp&&(menu_menu==lcd_status_screen);
|
||||||
bTemp=bTemp&&((oFsensorPCB==ClFsensorPCB::_Old)||(oFsensorPCB==ClFsensorPCB::_Undef));
|
bTemp=bTemp&&((oFsensorPCB==ClFsensorPCB::_Old)||(oFsensorPCB==ClFsensorPCB::_Undef));
|
||||||
bTemp=bTemp&&fsensor_enabled;
|
bTemp=bTemp&&fsensor_enabled;
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,14 @@ static void temp_runaway_check(int _heater_id, float _target_temperature, float
|
||||||
static void temp_runaway_stop(bool isPreheat, bool isBed);
|
static void temp_runaway_stop(bool isPreheat, bool isBed);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// return "false", if all extruder-heaters are 'off' (ie. "true", if any heater is 'on')
|
||||||
|
bool checkAllHotends(void)
|
||||||
|
{
|
||||||
|
bool result=false;
|
||||||
|
for(int i=0;i<EXTRUDERS;i++) result=(result||(target_temperature[i]!=0));
|
||||||
|
return(result);
|
||||||
|
}
|
||||||
|
|
||||||
void PID_autotune(float temp, int extruder, int ncycles)
|
void PID_autotune(float temp, int extruder, int ncycles)
|
||||||
{
|
{
|
||||||
pid_number_of_cycles = ncycles;
|
pid_number_of_cycles = ncycles;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,8 @@
|
||||||
void tp_init(); //initialize the heating
|
void tp_init(); //initialize the heating
|
||||||
void manage_heater(); //it is critical that this is called periodically.
|
void manage_heater(); //it is critical that this is called periodically.
|
||||||
|
|
||||||
|
extern bool checkAllHotends(void);
|
||||||
|
|
||||||
// low level conversion routines
|
// low level conversion routines
|
||||||
// do not use these routines and variables outside of temperature.cpp
|
// do not use these routines and variables outside of temperature.cpp
|
||||||
extern int target_temperature[EXTRUDERS];
|
extern int target_temperature[EXTRUDERS];
|
||||||
|
|
@ -220,6 +222,9 @@ FORCE_INLINE bool isCoolingBed() {
|
||||||
#error Invalid number of extruders
|
#error Invalid number of extruders
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// return "false", if all heaters are 'off' (ie. "true", if any heater is 'on')
|
||||||
|
#define CHECK_ALL_HEATERS (checkAllHotends()||(target_temperature_bed!=0))
|
||||||
|
|
||||||
int getHeaterPower(int heater);
|
int getHeaterPower(int heater);
|
||||||
void disable_heater();
|
void disable_heater();
|
||||||
void updatePID();
|
void updatePID();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue