@@ -232,6 +232,7 @@ typedef struct TempInfo {
232
232
typedef struct HeaterInfo : public TempInfo {
233
233
celsius_t target;
234
234
uint8_t soft_pwm_amount;
235
+ bool is_below_target (const celsius_t offs=0 ) const { return (celsius < (target + offs)); }
235
236
} heater_info_t ;
236
237
237
238
// A heater with PID stabilization
@@ -715,9 +716,9 @@ class Temperature {
715
716
static void readings_ready ();
716
717
717
718
/* *
718
- * Call periodically to manage heaters
719
+ * Call periodically to manage heaters and keep the watchdog fed
719
720
*/
720
- static void manage_heater () __O2; // __O2 added to work around a compiler error
721
+ static void task ();
721
722
722
723
/* *
723
724
* Preheating hotends
@@ -807,6 +808,8 @@ class Temperature {
807
808
#endif
808
809
}
809
810
811
+ static void manage_hotends (const millis_t &ms);
812
+
810
813
#endif // HAS_HOTEND
811
814
812
815
#if HAS_HEATED_BED
@@ -819,6 +822,9 @@ class Temperature {
819
822
static celsius_t degTargetBed () { return temp_bed.target ; }
820
823
static bool isHeatingBed () { return temp_bed.target > temp_bed.celsius ; }
821
824
static bool isCoolingBed () { return temp_bed.target < temp_bed.celsius ; }
825
+ static bool degBedNear (const celsius_t temp) {
826
+ return ABS (wholeDegBed () - temp) < (TEMP_BED_HYSTERESIS);
827
+ }
822
828
823
829
// Start watching the Bed to make sure it's really heating up
824
830
static void start_watching_bed () { TERN_ (WATCH_BED, watch_bed.restart (degBed (), degTargetBed ())); }
@@ -835,9 +841,7 @@ class Temperature {
835
841
836
842
static void wait_for_bed_heating ();
837
843
838
- static bool degBedNear (const celsius_t temp) {
839
- return ABS (wholeDegBed () - temp) < (TEMP_BED_HYSTERESIS);
840
- }
844
+ static void manage_heated_bed (const millis_t &ms);
841
845
842
846
#endif // HAS_HEATED_BED
843
847
@@ -863,6 +867,7 @@ class Temperature {
863
867
static bool isHeatingChamber () { return temp_chamber.target > temp_chamber.celsius ; }
864
868
static bool isCoolingChamber () { return temp_chamber.target < temp_chamber.celsius ; }
865
869
static bool wait_for_chamber (const bool no_wait_for_cooling=true );
870
+ static void manage_heated_chamber (const millis_t &ms);
866
871
#endif
867
872
#endif
868
873
@@ -886,6 +891,7 @@ class Temperature {
886
891
static bool isLaserHeating () { return temp_cooler.target > temp_cooler.celsius ; }
887
892
static bool isLaserCooling () { return temp_cooler.target < temp_cooler.celsius ; }
888
893
static bool wait_for_cooler (const bool no_wait_for_cooling=true );
894
+ static void manage_cooler (const millis_t &ms);
889
895
#endif
890
896
#endif
891
897
0 commit comments