♻️ Encapsulate PID in class (#24389)
This commit is contained in:
@ -1202,7 +1202,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp)
|
||||
Popup_Handler(ETemp);
|
||||
else {
|
||||
if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) {
|
||||
if (thermalManager.temp_hotend[0].is_below_target(-2)) {
|
||||
Popup_Handler(Heating);
|
||||
thermalManager.wait_for_hotend(0);
|
||||
}
|
||||
@ -1345,7 +1345,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
Popup_Handler(ETemp);
|
||||
}
|
||||
else {
|
||||
if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) {
|
||||
if (thermalManager.temp_hotend[0].is_below_target(-2)) {
|
||||
Popup_Handler(Heating);
|
||||
thermalManager.wait_for_hotend(0);
|
||||
Redraw_Menu();
|
||||
@ -1732,7 +1732,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp)
|
||||
Popup_Handler(ETemp);
|
||||
else {
|
||||
if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) {
|
||||
if (thermalManager.temp_hotend[0].is_below_target(-2)) {
|
||||
Popup_Handler(Heating);
|
||||
thermalManager.wait_for_hotend(0);
|
||||
}
|
||||
@ -1751,7 +1751,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
Popup_Handler(ETemp);
|
||||
}
|
||||
else {
|
||||
if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) {
|
||||
if (thermalManager.temp_hotend[0].is_below_target(-2)) {
|
||||
Popup_Handler(Heating);
|
||||
thermalManager.wait_for_hotend(0);
|
||||
}
|
||||
@ -1769,7 +1769,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
||||
if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp)
|
||||
Popup_Handler(ETemp);
|
||||
else {
|
||||
if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) {
|
||||
if (thermalManager.temp_hotend[0].is_below_target(-2)) {
|
||||
Popup_Handler(Heating);
|
||||
thermalManager.wait_for_hotend(0);
|
||||
}
|
||||
@ -4404,7 +4404,7 @@ void CrealityDWINClass::Popup_Control() {
|
||||
if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp)
|
||||
Popup_Handler(ETemp);
|
||||
else {
|
||||
if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) {
|
||||
if (thermalManager.temp_hotend[0].is_below_target(-2)) {
|
||||
Popup_Handler(Heating);
|
||||
thermalManager.wait_for_hotend(0);
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
void yield() {
|
||||
if (!flags.printer_killed) thermalManager.manage_heater();
|
||||
if (!flags.printer_killed) thermalManager.task();
|
||||
}
|
||||
|
||||
void enableHeater(const extruder_t extruder) {
|
||||
|
Reference in New Issue
Block a user