|
@@ -92,6 +92,10 @@ enum ADCSensorState {
|
92
|
92
|
|
93
|
93
|
#define ACTUAL_ADC_SAMPLES max(int(MIN_ADC_ISR_LOOPS), int(SensorsReady))
|
94
|
94
|
|
|
95
|
+#if !HAS_HEATER_BED
|
|
96
|
+ constexpr int16_t target_temperature_bed = 0;
|
|
97
|
+#endif
|
|
98
|
+
|
95
|
99
|
class Temperature {
|
96
|
100
|
|
97
|
101
|
public:
|
|
@@ -100,8 +104,11 @@ class Temperature {
|
100
|
104
|
current_temperature_bed;
|
101
|
105
|
static int16_t current_temperature_raw[HOTENDS],
|
102
|
106
|
target_temperature[HOTENDS],
|
103
|
|
- current_temperature_bed_raw,
|
104
|
|
- target_temperature_bed;
|
|
107
|
+ current_temperature_bed_raw;
|
|
108
|
+
|
|
109
|
+ #if HAS_HEATER_BED
|
|
110
|
+ static int16_t target_temperature_bed;
|
|
111
|
+ #endif
|
105
|
112
|
|
106
|
113
|
static volatile bool in_temp_isr;
|
107
|
114
|
|
|
@@ -382,9 +389,17 @@ class Temperature {
|
382
|
389
|
}
|
383
|
390
|
|
384
|
391
|
static void setTargetBed(const int16_t celsius) {
|
385
|
|
- target_temperature_bed = celsius;
|
386
|
|
- #if WATCH_THE_BED
|
387
|
|
- start_watching_bed();
|
|
392
|
+ #if HAS_HEATER_BED
|
|
393
|
+ target_temperature_bed =
|
|
394
|
+ #ifdef BED_MAXTEMP
|
|
395
|
+ min(celsius, BED_MAXTEMP)
|
|
396
|
+ #else
|
|
397
|
+ celsius
|
|
398
|
+ #endif
|
|
399
|
+ ;
|
|
400
|
+ #if WATCH_THE_BED
|
|
401
|
+ start_watching_bed();
|
|
402
|
+ #endif
|
388
|
403
|
#endif
|
389
|
404
|
}
|
390
|
405
|
|