🩹 Fix Ender-3 V2 with no fan

This commit is contained in:
Scott Lahteine
2023-03-29 21:50:04 -05:00
parent 85e28f3123
commit 59a2cb032f
2 changed files with 22 additions and 21 deletions

View File

@@ -3862,7 +3862,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
Draw_Menu_Item(row, ICON_Back, F("Cancel")); Draw_Menu_Item(row, ICON_Back, F("Cancel"));
else { else {
thermalManager.setTargetHotend(0, 0); thermalManager.setTargetHotend(0, 0);
thermalManager.set_fan_speed(0, 0); TERN_(HAS_FAN, thermalManager.set_fan_speed(0, 0));
Redraw_Menu(false, true, true); Redraw_Menu(false, true, true);
} }
break; break;
@@ -4474,7 +4474,7 @@ void CrealityDWINClass::Popup_Control() {
case ETemp: case ETemp:
if (selection == 0) { if (selection == 0) {
thermalManager.setTargetHotend(EXTRUDE_MINTEMP, 0); thermalManager.setTargetHotend(EXTRUDE_MINTEMP, 0);
thermalManager.set_fan_speed(0, MAX_FAN_SPEED); TERN_(HAS_FAN, thermalManager.set_fan_speed(0, MAX_FAN_SPEED));
Draw_Menu(PreheatHotend); Draw_Menu(PreheatHotend);
} }
else else

View File

@@ -143,6 +143,7 @@ void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink,
#endif // LCD_SHOW_E_TOTAL #endif // LCD_SHOW_E_TOTAL
#if HAS_FAN
// //
// Fan Icon and Percentage // Fan Icon and Percentage
// //
@@ -162,6 +163,7 @@ FORCE_INLINE void _draw_fan_status(const uint16_t x, const uint16_t y) {
DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string()));
} }
} }
#endif
/** /**
* Draw a single heater icon with current and target temperature, at the given XY * Draw a single heater icon with current and target temperature, at the given XY
@@ -300,7 +302,6 @@ void MarlinUI::draw_status_screen() {
#if HAS_HEATED_BED #if HAS_HEATED_BED
_draw_heater_status(H_BED, hx, STATUS_HEATERS_Y); _draw_heater_status(H_BED, hx, STATUS_HEATERS_Y);
#endif #endif
#if HAS_FAN #if HAS_FAN
_draw_fan_status(LCD_PIXEL_WIDTH - STATUS_CHR_WIDTH * 5, STATUS_FAN_Y); _draw_fan_status(LCD_PIXEL_WIDTH - STATUS_CHR_WIDTH * 5, STATUS_FAN_Y);
#endif #endif