|
@ -207,7 +207,7 @@ CrealityDWINClass CrealityDWIN; |
|
|
|
|
|
|
|
|
void manual_value_update(bool undefined=false) { |
|
|
void manual_value_update(bool undefined=false) { |
|
|
sprintf_P(cmd, PSTR("M421 I%i J%i Z%s %s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1), undefined ? "N" : ""); |
|
|
sprintf_P(cmd, PSTR("M421 I%i J%i Z%s %s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1), undefined ? "N" : ""); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -267,7 +267,7 @@ CrealityDWINClass CrealityDWIN; |
|
|
|
|
|
|
|
|
void manual_value_update() { |
|
|
void manual_value_update() { |
|
|
sprintf_P(cmd, PSTR("G29 I%i J%i Z%s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1)); |
|
|
sprintf_P(cmd, PSTR("G29 I%i J%i Z%s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -283,9 +283,9 @@ CrealityDWINClass CrealityDWIN; |
|
|
else { |
|
|
else { |
|
|
CrealityDWIN.Popup_Handler(MoveWait); |
|
|
CrealityDWIN.Popup_Handler(MoveWait); |
|
|
sprintf_P(cmd, PSTR("G0 F300 Z%s"), dtostrf(Z_CLEARANCE_BETWEEN_PROBES, 1, 3, str_1)); |
|
|
sprintf_P(cmd, PSTR("G0 F300 Z%s"), dtostrf(Z_CLEARANCE_BETWEEN_PROBES, 1, 3, str_1)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
sprintf_P(cmd, PSTR("G42 F4000 I%i J%i"), mesh_x, mesh_y); |
|
|
sprintf_P(cmd, PSTR("G42 F4000 I%i J%i"), mesh_x, mesh_y); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
current_position.z = goto_mesh_value ? Z_VALUES_ARR[mesh_x][mesh_y] : Z_CLEARANCE_BETWEEN_PROBES; |
|
|
current_position.z = goto_mesh_value ? Z_VALUES_ARR[mesh_x][mesh_y] : Z_CLEARANCE_BETWEEN_PROBES; |
|
|
planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); |
|
|
planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); |
|
@ -1132,7 +1132,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
} |
|
|
} |
|
|
Popup_Handler(FilChange); |
|
|
Popup_Handler(FilChange); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
@ -1172,7 +1172,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_MoveX, F("Home X")); |
|
|
Draw_Menu_Item(row, ICON_MoveX, F("Home X")); |
|
|
else { |
|
|
else { |
|
|
Popup_Handler(Home); |
|
|
Popup_Handler(Home); |
|
|
gcode.process_subcommands_now_P(PSTR("G28 X")); |
|
|
gcode.process_subcommands_now(F("G28 X")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1182,7 +1182,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_MoveY, F("Home Y")); |
|
|
Draw_Menu_Item(row, ICON_MoveY, F("Home Y")); |
|
|
else { |
|
|
else { |
|
|
Popup_Handler(Home); |
|
|
Popup_Handler(Home); |
|
|
gcode.process_subcommands_now_P(PSTR("G28 Y")); |
|
|
gcode.process_subcommands_now(F("G28 Y")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1192,7 +1192,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_MoveZ, F("Home Z")); |
|
|
Draw_Menu_Item(row, ICON_MoveZ, F("Home Z")); |
|
|
else { |
|
|
else { |
|
|
Popup_Handler(Home); |
|
|
Popup_Handler(Home); |
|
|
gcode.process_subcommands_now_P(PSTR("G28 Z")); |
|
|
gcode.process_subcommands_now(F("G28 Z")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1201,7 +1201,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (draw) |
|
|
if (draw) |
|
|
Draw_Menu_Item(row, ICON_SetHome, F("Set Home Position")); |
|
|
Draw_Menu_Item(row, ICON_SetHome, F("Set Home Position")); |
|
|
else { |
|
|
else { |
|
|
gcode.process_subcommands_now_P(PSTR("G92 X0 Y0 Z0")); |
|
|
gcode.process_subcommands_now(F("G92 X0 Y0 Z0")); |
|
|
AudioFeedback(); |
|
|
AudioFeedback(); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
@ -1366,14 +1366,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (use_probe) { |
|
|
if (use_probe) { |
|
|
#if HAS_BED_PROBE |
|
|
#if HAS_BED_PROBE |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Popup_Handler(ManualProbing); |
|
|
Popup_Handler(ManualProbing); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1387,14 +1387,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (use_probe) { |
|
|
if (use_probe) { |
|
|
#if HAS_BED_PROBE |
|
|
#if HAS_BED_PROBE |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Popup_Handler(ManualProbing); |
|
|
Popup_Handler(ManualProbing); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1408,14 +1408,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (use_probe) { |
|
|
if (use_probe) { |
|
|
#if HAS_BED_PROBE |
|
|
#if HAS_BED_PROBE |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Popup_Handler(ManualProbing); |
|
|
Popup_Handler(ManualProbing); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1429,14 +1429,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (use_probe) { |
|
|
if (use_probe) { |
|
|
#if HAS_BED_PROBE |
|
|
#if HAS_BED_PROBE |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Popup_Handler(ManualProbing); |
|
|
Popup_Handler(ManualProbing); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1450,14 +1450,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (use_probe) { |
|
|
if (use_probe) { |
|
|
#if HAS_BED_PROBE |
|
|
#if HAS_BED_PROBE |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(X_MAX_POS / 2.0f - probe.offset.x, 1, 3, str_1), dtostrf(Y_MAX_POS / 2.0f - probe.offset.y, 1, 3, str_2)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(X_MAX_POS / 2.0f - probe.offset.x, 1, 3, str_1), dtostrf(Y_MAX_POS / 2.0f - probe.offset.y, 1, 3, str_2)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Popup_Handler(ManualProbing); |
|
|
Popup_Handler(ManualProbing); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1500,16 +1500,16 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_Homing, F("Home Z Axis")); |
|
|
Draw_Menu_Item(row, ICON_Homing, F("Home Z Axis")); |
|
|
else { |
|
|
else { |
|
|
Popup_Handler(Home); |
|
|
Popup_Handler(Home); |
|
|
gcode.process_subcommands_now_P(PSTR("G28 Z")); |
|
|
gcode.process_subcommands_now(F("G28 Z")); |
|
|
Popup_Handler(MoveWait); |
|
|
Popup_Handler(MoveWait); |
|
|
#if ENABLED(Z_SAFE_HOMING) |
|
|
#if ENABLED(Z_SAFE_HOMING) |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
#else |
|
|
#else |
|
|
gcode.process_subcommands_now_P(PSTR("G0 F4000 X117.5 Y117.5")); |
|
|
gcode.process_subcommands_now(F("G0 F4000 X117.5 Y117.5")); |
|
|
#endif |
|
|
#endif |
|
|
gcode.process_subcommands_now_P(PSTR("G0 F300 Z0")); |
|
|
gcode.process_subcommands_now(F("G0 F300 Z0")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1529,11 +1529,11 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
#if ENABLED(Z_SAFE_HOMING) |
|
|
#if ENABLED(Z_SAFE_HOMING) |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2)); |
|
|
sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
#else |
|
|
#else |
|
|
gcode.process_subcommands_now_P(PSTR("G0 F4000 X117.5 Y117.5")); |
|
|
gcode.process_subcommands_now(F("G0 F4000 X117.5 Y117.5")); |
|
|
#endif |
|
|
#endif |
|
|
gcode.process_subcommands_now_P(PSTR("G0 F300 Z0")); |
|
|
gcode.process_subcommands_now(F("G0 F300 Z0")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1555,7 +1555,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
else { |
|
|
else { |
|
|
if (zoffsetvalue < MAX_Z_OFFSET) { |
|
|
if (zoffsetvalue < MAX_Z_OFFSET) { |
|
|
if (liveadjust) { |
|
|
if (liveadjust) { |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z0.01")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
} |
|
|
} |
|
|
zoffsetvalue += 0.01; |
|
|
zoffsetvalue += 0.01; |
|
@ -1569,7 +1569,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
else { |
|
|
else { |
|
|
if (zoffsetvalue > MIN_Z_OFFSET) { |
|
|
if (zoffsetvalue > MIN_Z_OFFSET) { |
|
|
if (liveadjust) { |
|
|
if (liveadjust) { |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z-0.01")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
} |
|
|
} |
|
|
zoffsetvalue -= 0.01; |
|
|
zoffsetvalue -= 0.01; |
|
@ -1737,7 +1737,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
thermalManager.wait_for_hotend(0); |
|
|
thermalManager.wait_for_hotend(0); |
|
|
} |
|
|
} |
|
|
Popup_Handler(FilLoad); |
|
|
Popup_Handler(FilLoad); |
|
|
gcode.process_subcommands_now_P(PSTR("M701")); |
|
|
gcode.process_subcommands_now(F("M701")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1756,7 +1756,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
thermalManager.wait_for_hotend(0); |
|
|
thermalManager.wait_for_hotend(0); |
|
|
} |
|
|
} |
|
|
Popup_Handler(FilLoad, true); |
|
|
Popup_Handler(FilLoad, true); |
|
|
gcode.process_subcommands_now_P(PSTR("M702")); |
|
|
gcode.process_subcommands_now(F("M702")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -1775,7 +1775,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
} |
|
|
} |
|
|
Popup_Handler(FilChange); |
|
|
Popup_Handler(FilChange); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
@ -2032,7 +2032,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
else { |
|
|
else { |
|
|
Popup_Handler(PIDWait); |
|
|
Popup_Handler(PIDWait); |
|
|
sprintf_P(cmd, PSTR("M303 E0 C%i S%i U1"), PID_cycles, PID_e_temp); |
|
|
sprintf_P(cmd, PSTR("M303 E0 C%i S%i U1"), PID_cycles, PID_e_temp); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -2099,7 +2099,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
else { |
|
|
else { |
|
|
Popup_Handler(PIDWait); |
|
|
Popup_Handler(PIDWait); |
|
|
sprintf_P(cmd, PSTR("M303 E-1 C%i S%i U1"), PID_cycles, PID_bed_temp); |
|
|
sprintf_P(cmd, PSTR("M303 E-1 C%i S%i U1"), PID_cycles, PID_bed_temp); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -3045,7 +3045,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_StepY, F("M48 Probe Test")); |
|
|
Draw_Menu_Item(row, ICON_StepY, F("M48 Probe Test")); |
|
|
else { |
|
|
else { |
|
|
sprintf_P(cmd, PSTR("G28O\nM48 X%s Y%s P%i"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), testcount); |
|
|
sprintf_P(cmd, PSTR("G28O\nM48 X%s Y%s P%i"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), testcount); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case PROBE_TEST_COUNT: |
|
|
case PROBE_TEST_COUNT: |
|
@ -3157,11 +3157,12 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Popup_Handler(Home); |
|
|
Popup_Handler(Home); |
|
|
gcode.home_all_axes(true); |
|
|
gcode.home_all_axes(true); |
|
|
Popup_Handler(Level); |
|
|
Popup_Handler(Level); |
|
|
if (mesh_conf.tilt_grid > 1) |
|
|
if (mesh_conf.tilt_grid > 1) { |
|
|
sprintf_P(cmd, PSTR("G29 J%i"), mesh_conf.tilt_grid); |
|
|
sprintf_P(cmd, PSTR("G29 J%i"), mesh_conf.tilt_grid); |
|
|
|
|
|
gcode.process_subcommands_now(cmd); |
|
|
|
|
|
} |
|
|
else |
|
|
else |
|
|
sprintf_P(cmd, PSTR("G29 J")); |
|
|
gcode.process_subcommands_now(F("G29 J")); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
|
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
@ -3189,8 +3190,8 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
#endif |
|
|
#endif |
|
|
#if HAS_BED_PROBE |
|
|
#if HAS_BED_PROBE |
|
|
Popup_Handler(Level); |
|
|
Popup_Handler(Level); |
|
|
gcode.process_subcommands_now_P(PSTR("G29 P0\nG29 P1")); |
|
|
gcode.process_subcommands_now(F("G29 P0\nG29 P1")); |
|
|
gcode.process_subcommands_now_P(PSTR("G29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nM420 S1")); |
|
|
gcode.process_subcommands_now(F("G29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nM420 S1")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Update_Status("Probed all reachable points"); |
|
|
Update_Status("Probed all reachable points"); |
|
|
Popup_Handler(SaveLevel); |
|
|
Popup_Handler(SaveLevel); |
|
@ -3205,7 +3206,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
#endif |
|
|
#endif |
|
|
#elif HAS_BED_PROBE |
|
|
#elif HAS_BED_PROBE |
|
|
Popup_Handler(Level); |
|
|
Popup_Handler(Level); |
|
|
gcode.process_subcommands_now_P(PSTR("G29")); |
|
|
gcode.process_subcommands_now(F("G29")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Popup_Handler(SaveLevel); |
|
|
Popup_Handler(SaveLevel); |
|
|
#else |
|
|
#else |
|
@ -3213,7 +3214,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
set_bed_leveling_enabled(false); |
|
|
set_bed_leveling_enabled(false); |
|
|
gridpoint = 1; |
|
|
gridpoint = 1; |
|
|
Popup_Handler(MoveWait); |
|
|
Popup_Handler(MoveWait); |
|
|
gcode.process_subcommands_now_P(PSTR("G29")); |
|
|
gcode.process_subcommands_now(F("G29")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Draw_Menu(ManualMesh); |
|
|
Draw_Menu(ManualMesh); |
|
|
#endif |
|
|
#endif |
|
@ -3296,7 +3297,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Popup_Handler(MeshSlot); |
|
|
Popup_Handler(MeshSlot); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
gcode.process_subcommands_now_P(PSTR("G29 L")); |
|
|
gcode.process_subcommands_now(F("G29 L")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
AudioFeedback(true); |
|
|
AudioFeedback(true); |
|
|
} |
|
|
} |
|
@ -3309,7 +3310,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Popup_Handler(MeshSlot); |
|
|
Popup_Handler(MeshSlot); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
gcode.process_subcommands_now_P(PSTR("G29 S")); |
|
|
gcode.process_subcommands_now(F("G29 S")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
AudioFeedback(true); |
|
|
AudioFeedback(true); |
|
|
} |
|
|
} |
|
@ -3405,7 +3406,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Convert Mesh to Plane")); |
|
|
Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Convert Mesh to Plane")); |
|
|
else { |
|
|
else { |
|
|
if (mesh_conf.create_plane_from_mesh()) break; |
|
|
if (mesh_conf.create_plane_from_mesh()) break; |
|
|
gcode.process_subcommands_now_P(PSTR("M420 S1")); |
|
|
gcode.process_subcommands_now(F("M420 S1")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
AudioFeedback(true); |
|
|
AudioFeedback(true); |
|
|
} |
|
|
} |
|
@ -3513,7 +3514,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); |
|
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) { |
|
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) { |
|
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01; |
|
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01; |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z0.01")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
current_position.z += 0.01f; |
|
|
current_position.z += 0.01f; |
|
|
sync_plan_position(); |
|
|
sync_plan_position(); |
|
@ -3525,7 +3526,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down")); |
|
|
Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down")); |
|
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) { |
|
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) { |
|
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01; |
|
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01; |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z-0.01")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
current_position.z -= 0.01f; |
|
|
current_position.z -= 0.01f; |
|
|
sync_plan_position(); |
|
|
sync_plan_position(); |
|
@ -3596,7 +3597,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
mesh_conf.manual_move(); |
|
|
mesh_conf.manual_move(); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
gcode.process_subcommands_now_P(PSTR("G29 S")); |
|
|
gcode.process_subcommands_now(F("G29 S")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
AudioFeedback(true); |
|
|
AudioFeedback(true); |
|
|
Draw_Menu(Leveling, LEVELING_GET_MESH); |
|
|
Draw_Menu(Leveling, LEVELING_GET_MESH); |
|
@ -3634,7 +3635,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); |
|
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) { |
|
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) { |
|
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01; |
|
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01; |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z0.01")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
current_position.z += 0.01f; |
|
|
current_position.z += 0.01f; |
|
|
sync_plan_position(); |
|
|
sync_plan_position(); |
|
@ -3646,7 +3647,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Down")); |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Down")); |
|
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) { |
|
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) { |
|
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01; |
|
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01; |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z-0.01")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
current_position.z -= 0.01f; |
|
|
current_position.z -= 0.01f; |
|
|
sync_plan_position(); |
|
|
sync_plan_position(); |
|
@ -3673,7 +3674,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (draw) |
|
|
if (draw) |
|
|
Draw_Menu_Item(row, ICON_Back, F("Cancel")); |
|
|
Draw_Menu_Item(row, ICON_Back, F("Cancel")); |
|
|
else { |
|
|
else { |
|
|
gcode.process_subcommands_now_P(PSTR("G29 A")); |
|
|
gcode.process_subcommands_now(F("G29 A")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
set_bed_leveling_enabled(level_state); |
|
|
set_bed_leveling_enabled(level_state); |
|
|
Draw_Menu(Leveling, LEVELING_GET_MESH); |
|
|
Draw_Menu(Leveling, LEVELING_GET_MESH); |
|
@ -3688,13 +3689,13 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
} |
|
|
} |
|
|
else if (gridpoint < GRID_MAX_POINTS) { |
|
|
else if (gridpoint < GRID_MAX_POINTS) { |
|
|
Popup_Handler(MoveWait); |
|
|
Popup_Handler(MoveWait); |
|
|
gcode.process_subcommands_now_P(PSTR("G29")); |
|
|
gcode.process_subcommands_now(F("G29")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
gridpoint++; |
|
|
gridpoint++; |
|
|
Redraw_Menu(); |
|
|
Redraw_Menu(); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
gcode.process_subcommands_now_P(PSTR("G29")); |
|
|
gcode.process_subcommands_now(F("G29")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
AudioFeedback(settings.save()); |
|
|
AudioFeedback(settings.save()); |
|
|
Draw_Menu(Leveling, LEVELING_GET_MESH); |
|
|
Draw_Menu(Leveling, LEVELING_GET_MESH); |
|
@ -3713,7 +3714,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (draw) |
|
|
if (draw) |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); |
|
|
else if (current_position.z < MAX_Z_OFFSET) { |
|
|
else if (current_position.z < MAX_Z_OFFSET) { |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z0.01")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
current_position.z += 0.01f; |
|
|
current_position.z += 0.01f; |
|
|
sync_plan_position(); |
|
|
sync_plan_position(); |
|
@ -3724,7 +3725,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (draw) |
|
|
if (draw) |
|
|
Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down")); |
|
|
Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down")); |
|
|
else if (current_position.z > MIN_Z_OFFSET) { |
|
|
else if (current_position.z > MIN_Z_OFFSET) { |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z-0.01")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
current_position.z -= 0.01f; |
|
|
current_position.z -= 0.01f; |
|
|
sync_plan_position(); |
|
|
sync_plan_position(); |
|
@ -3845,7 +3846,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (draw) |
|
|
if (draw) |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Z-Offset Up")); |
|
|
Draw_Menu_Item(row, ICON_Axis, F("Z-Offset Up")); |
|
|
else if (zoffsetvalue < MAX_Z_OFFSET) { |
|
|
else if (zoffsetvalue < MAX_Z_OFFSET) { |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z0.01")); |
|
|
zoffsetvalue += 0.01; |
|
|
zoffsetvalue += 0.01; |
|
|
Draw_Float(zoffsetvalue, row - 1, false, 100); |
|
|
Draw_Float(zoffsetvalue, row - 1, false, 100); |
|
|
} |
|
|
} |
|
@ -3854,7 +3855,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
if (draw) |
|
|
if (draw) |
|
|
Draw_Menu_Item(row, ICON_AxisD, F("Z-Offset Down")); |
|
|
Draw_Menu_Item(row, ICON_AxisD, F("Z-Offset Down")); |
|
|
else if (zoffsetvalue > MIN_Z_OFFSET) { |
|
|
else if (zoffsetvalue > MIN_Z_OFFSET) { |
|
|
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); |
|
|
gcode.process_subcommands_now(F("M290 Z-0.01")); |
|
|
zoffsetvalue -= 0.01; |
|
|
zoffsetvalue -= 0.01; |
|
|
Draw_Float(zoffsetvalue, row - 2, false, 100); |
|
|
Draw_Float(zoffsetvalue, row - 2, false, 100); |
|
|
} |
|
|
} |
|
@ -3932,27 +3933,27 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/ |
|
|
case Prepare: |
|
|
case Prepare: |
|
|
Popup_Handler(FilChange); |
|
|
Popup_Handler(FilChange); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
break; |
|
|
break; |
|
|
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) |
|
|
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) |
|
|
case ChangeFilament: |
|
|
case ChangeFilament: |
|
|
switch (last_selection) { |
|
|
switch (last_selection) { |
|
|
case CHANGEFIL_LOAD: |
|
|
case CHANGEFIL_LOAD: |
|
|
Popup_Handler(FilLoad); |
|
|
Popup_Handler(FilLoad); |
|
|
gcode.process_subcommands_now_P("M701"); |
|
|
gcode.process_subcommands_now(F("M701")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(true, true, true); |
|
|
Redraw_Menu(true, true, true); |
|
|
break; |
|
|
break; |
|
|
case CHANGEFIL_UNLOAD: |
|
|
case CHANGEFIL_UNLOAD: |
|
|
Popup_Handler(FilLoad, true); |
|
|
Popup_Handler(FilLoad, true); |
|
|
gcode.process_subcommands_now_P("M702"); |
|
|
gcode.process_subcommands_now(F("M702")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
Redraw_Menu(true, true, true); |
|
|
Redraw_Menu(true, true, true); |
|
|
break; |
|
|
break; |
|
|
case CHANGEFIL_CHANGE: |
|
|
case CHANGEFIL_CHANGE: |
|
|
Popup_Handler(FilChange); |
|
|
Popup_Handler(FilChange); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
@ -4291,7 +4292,7 @@ void CrealityDWINClass::Value_Control() { |
|
|
} |
|
|
} |
|
|
else if (active_menu == Tune && selection == TUNE_ZOFFSET) { |
|
|
else if (active_menu == Tune && selection == TUNE_ZOFFSET) { |
|
|
sprintf_P(cmd, PSTR("M290 Z%s"), dtostrf((tempvalue / valueunit - zoffsetvalue), 1, 3, str_1)); |
|
|
sprintf_P(cmd, PSTR("M290 Z%s"), dtostrf((tempvalue / valueunit - zoffsetvalue), 1, 3, str_1)); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
} |
|
|
} |
|
|
if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki)) |
|
|
if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki)) |
|
|
tempvalue = scalePID_i(tempvalue); |
|
|
tempvalue = scalePID_i(tempvalue); |
|
@ -4490,11 +4491,11 @@ void CrealityDWINClass::Print_Screen_Control() { |
|
|
char cmnd[20]; |
|
|
char cmnd[20]; |
|
|
#if HAS_HEATED_BED |
|
|
#if HAS_HEATED_BED |
|
|
cmnd[sprintf_P(cmnd, PSTR("M140 S%i"), pausebed)] = '\0'; |
|
|
cmnd[sprintf_P(cmnd, PSTR("M140 S%i"), pausebed)] = '\0'; |
|
|
gcode.process_subcommands_now_P(PSTR(cmnd)); |
|
|
gcode.process_subcommands_now(cmnd); |
|
|
#endif |
|
|
#endif |
|
|
#if HAS_EXTRUDERS |
|
|
#if HAS_EXTRUDERS |
|
|
cmnd[sprintf_P(cmnd, PSTR("M109 S%i"), pausetemp)] = '\0'; |
|
|
cmnd[sprintf_P(cmnd, PSTR("M109 S%i"), pausetemp)] = '\0'; |
|
|
gcode.process_subcommands_now_P(PSTR(cmnd)); |
|
|
gcode.process_subcommands_now(cmnd); |
|
|
#endif |
|
|
#endif |
|
|
TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan); |
|
|
TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
@ -4619,7 +4620,7 @@ void CrealityDWINClass::Popup_Control() { |
|
|
} |
|
|
} |
|
|
Popup_Handler(FilChange); |
|
|
Popup_Handler(FilChange); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); |
|
|
gcode.process_subcommands_now_P(cmd); |
|
|
gcode.process_subcommands_now(cmd); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
@ -4642,7 +4643,7 @@ void CrealityDWINClass::Popup_Control() { |
|
|
case SaveLevel: |
|
|
case SaveLevel: |
|
|
if (selection == 0) { |
|
|
if (selection == 0) { |
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL) |
|
|
#if ENABLED(AUTO_BED_LEVELING_UBL) |
|
|
gcode.process_subcommands_now_P(PSTR("G29 S")); |
|
|
gcode.process_subcommands_now(F("G29 S")); |
|
|
planner.synchronize(); |
|
|
planner.synchronize(); |
|
|
AudioFeedback(true); |
|
|
AudioFeedback(true); |
|
|
#else |
|
|
#else |
|
|