Dyze High Temp Thermistor Support
This commit is contained in:
@ -183,6 +183,14 @@ class Temperature {
|
||||
static int minttemp[HOTENDS];
|
||||
static int maxttemp[HOTENDS];
|
||||
|
||||
#ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
|
||||
static int consecutive_low_temperature_error[HOTENDS];
|
||||
#endif
|
||||
|
||||
#ifdef MILLISECONDS_PREHEAT_TIME
|
||||
static unsigned long preheat_end_time[HOTENDS];
|
||||
#endif
|
||||
|
||||
#ifdef BED_MINTEMP
|
||||
static int bed_minttemp_raw;
|
||||
#endif
|
||||
@ -235,6 +243,19 @@ class Temperature {
|
||||
*/
|
||||
static void manage_heater();
|
||||
|
||||
/**
|
||||
* Preheating hotends
|
||||
*/
|
||||
#ifdef MILLISECONDS_PREHEAT_TIME
|
||||
static bool is_preheating(uint8_t hotend) {
|
||||
return preheat_end_time[hotend] && PENDING(millis(), preheat_end_time[hotend]);
|
||||
}
|
||||
static void start_preheat_time(uint8_t hotend) { preheat_end_time[hotend] = millis() + MILLISECONDS_PREHEAT_TIME; }
|
||||
static void reset_preheat_time(uint8_t hotend) { preheat_end_time[hotend] = 0; }
|
||||
#else
|
||||
#define is_preheating(n) (false)
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_WIDTH_SENSOR)
|
||||
static float analog2widthFil(); // Convert raw Filament Width to millimeters
|
||||
static int widthFil_to_size_ratio(); // Convert raw Filament Width to an extrusion ratio
|
||||
@ -283,6 +304,12 @@ class Temperature {
|
||||
#if HOTENDS == 1
|
||||
UNUSED(e);
|
||||
#endif
|
||||
#ifdef MILLISECONDS_PREHEAT_TIME
|
||||
if (celsius == 0.0f)
|
||||
reset_preheat_time(hotend);
|
||||
else if (target_temperature[hotend] == 0.0f)
|
||||
start_preheat_time(hotend);
|
||||
#endif
|
||||
target_temperature[HOTEND_INDEX] = celsius;
|
||||
#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
|
||||
start_watching_heater(HOTEND_INDEX);
|
||||
|
Reference in New Issue
Block a user