|
|
@ -92,6 +92,10 @@ enum ADCSensorState {
|
|
|
|
|
|
|
|
|
|
|
|
#define ACTUAL_ADC_SAMPLES max(int(MIN_ADC_ISR_LOOPS), int(SensorsReady))
|
|
|
|
#define ACTUAL_ADC_SAMPLES max(int(MIN_ADC_ISR_LOOPS), int(SensorsReady))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !HAS_HEATER_BED
|
|
|
|
|
|
|
|
constexpr int16_t target_temperature_bed = 0;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
class Temperature {
|
|
|
|
class Temperature {
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
@ -100,8 +104,11 @@ class Temperature {
|
|
|
|
current_temperature_bed;
|
|
|
|
current_temperature_bed;
|
|
|
|
static int16_t current_temperature_raw[HOTENDS],
|
|
|
|
static int16_t current_temperature_raw[HOTENDS],
|
|
|
|
target_temperature[HOTENDS],
|
|
|
|
target_temperature[HOTENDS],
|
|
|
|
current_temperature_bed_raw,
|
|
|
|
current_temperature_bed_raw;
|
|
|
|
target_temperature_bed;
|
|
|
|
|
|
|
|
|
|
|
|
#if HAS_HEATER_BED
|
|
|
|
|
|
|
|
static int16_t target_temperature_bed;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
static volatile bool in_temp_isr;
|
|
|
|
static volatile bool in_temp_isr;
|
|
|
|
|
|
|
|
|
|
|
@ -382,10 +389,18 @@ class Temperature {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void setTargetBed(const int16_t celsius) {
|
|
|
|
static void setTargetBed(const int16_t celsius) {
|
|
|
|
target_temperature_bed = celsius;
|
|
|
|
#if HAS_HEATER_BED
|
|
|
|
|
|
|
|
target_temperature_bed =
|
|
|
|
|
|
|
|
#ifdef BED_MAXTEMP
|
|
|
|
|
|
|
|
min(celsius, BED_MAXTEMP)
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
celsius
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
;
|
|
|
|
#if WATCH_THE_BED
|
|
|
|
#if WATCH_THE_BED
|
|
|
|
start_watching_bed();
|
|
|
|
start_watching_bed();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static bool isHeatingHotend(uint8_t e) {
|
|
|
|
static bool isHeatingHotend(uint8_t e) {
|
|
|
|