Save some string flash
This commit is contained in:
@ -118,7 +118,7 @@ void _lcd_level_bed_corners() {
|
||||
ui.defer_status_screen();
|
||||
if (!all_axes_known()) {
|
||||
set_all_unhomed();
|
||||
queue.inject_P(PSTR("G28"));
|
||||
queue.inject_P(G28_STR);
|
||||
}
|
||||
|
||||
// Disable leveling so the planner won't mess with us
|
||||
|
@ -195,7 +195,7 @@
|
||||
ui.defer_status_screen();
|
||||
set_all_unhomed();
|
||||
ui.goto_screen(_lcd_level_bed_homing);
|
||||
queue.inject_P(PSTR("G28"));
|
||||
queue.inject_P(G28_STR);
|
||||
}
|
||||
|
||||
#endif // PROBE_MANUALLY || MESH_BED_LEVELING
|
||||
@ -241,7 +241,7 @@ void menu_bed_leveling() {
|
||||
|
||||
// Auto Home if not using manual probing
|
||||
#if NONE(PROBE_MANUALLY, MESH_BED_LEVELING)
|
||||
if (!is_homed) GCODES_ITEM(MSG_AUTO_HOME, PSTR("G28"));
|
||||
if (!is_homed) GCODES_ITEM(MSG_AUTO_HOME, G28_STR);
|
||||
#endif
|
||||
|
||||
// Level Bed
|
||||
|
@ -130,7 +130,7 @@ void menu_advanced_settings();
|
||||
|
||||
auto _recalc_offsets = []{
|
||||
if (active_extruder && all_axes_known()) { // For the 2nd extruder re-home so the next tool-change gets the new offsets.
|
||||
queue.inject_P(PSTR("G28")); // In future, we can babystep the 2nd extruder (if active), making homing unnecessary.
|
||||
queue.inject_P(G28_STR); // In future, we can babystep the 2nd extruder (if active), making homing unnecessary.
|
||||
active_extruder = 0;
|
||||
}
|
||||
};
|
||||
|
@ -79,7 +79,7 @@ void _man_probe_pt(const xy_pos_t &xy) {
|
||||
}
|
||||
|
||||
void _lcd_delta_calibrate_home() {
|
||||
queue.inject_P(PSTR("G28"));
|
||||
queue.inject_P(G28_STR);
|
||||
ui.goto_screen(_lcd_calibrate_homing);
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,8 @@ void menu_configuration();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern const char M21_STR[];
|
||||
|
||||
void menu_main() {
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_WATCH);
|
||||
@ -129,7 +131,7 @@ void menu_main() {
|
||||
SUBMENU(MSG_MEDIA_MENU, menu_media);
|
||||
MENU_ITEM(gcode,
|
||||
#if PIN_EXISTS(SD_DETECT)
|
||||
MSG_CHANGE_MEDIA, PSTR("M21")
|
||||
MSG_CHANGE_MEDIA, M21_STR
|
||||
#else
|
||||
MSG_RELEASE_MEDIA, PSTR("M22")
|
||||
#endif
|
||||
@ -140,7 +142,7 @@ void menu_main() {
|
||||
#if PIN_EXISTS(SD_DETECT)
|
||||
ACTION_ITEM(MSG_NO_MEDIA, nullptr);
|
||||
#else
|
||||
GCODES_ITEM(MSG_INIT_MEDIA, PSTR("M21"));
|
||||
GCODES_ITEM(MSG_INIT_MEDIA, M21_STR);
|
||||
ACTION_ITEM(MSG_MEDIA_RELEASED, nullptr);
|
||||
#endif
|
||||
}
|
||||
@ -218,7 +220,7 @@ void menu_main() {
|
||||
if (!card_open) {
|
||||
MENU_ITEM(gcode,
|
||||
#if PIN_EXISTS(SD_DETECT)
|
||||
MSG_CHANGE_MEDIA, PSTR("M21")
|
||||
MSG_CHANGE_MEDIA, M21_STR
|
||||
#else
|
||||
MSG_RELEASE_MEDIA, PSTR("M22")
|
||||
#endif
|
||||
@ -230,7 +232,7 @@ void menu_main() {
|
||||
#if PIN_EXISTS(SD_DETECT)
|
||||
ACTION_ITEM(MSG_NO_MEDIA, nullptr);
|
||||
#else
|
||||
GCODES_ITEM(MSG_INIT_MEDIA, PSTR("M21"));
|
||||
GCODES_ITEM(MSG_INIT_MEDIA, M21_STR);
|
||||
ACTION_ITEM(MSG_MEDIA_RELEASED, nullptr);
|
||||
#endif
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ void menu_move() {
|
||||
SUBMENU(MSG_MOVE_Z, []{ _menu_move_distance(Z_AXIS, lcd_move_z); });
|
||||
}
|
||||
else
|
||||
GCODES_ITEM(MSG_AUTO_HOME, PSTR("G28"));
|
||||
GCODES_ITEM(MSG_AUTO_HOME, G28_STR);
|
||||
|
||||
#if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, MAGNETIC_SWITCHING_TOOLHEAD)
|
||||
|
||||
@ -409,7 +409,7 @@ void menu_motion() {
|
||||
//
|
||||
// Auto Home
|
||||
//
|
||||
GCODES_ITEM(MSG_AUTO_HOME, PSTR("G28"));
|
||||
GCODES_ITEM(MSG_AUTO_HOME, G28_STR);
|
||||
#if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU)
|
||||
GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28 X"));
|
||||
GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28 Y"));
|
||||
|
@ -107,7 +107,7 @@ void lcd_z_offset_edit_setup(const float &initial) {
|
||||
*/
|
||||
void _lcd_ubl_build_custom_mesh() {
|
||||
char ubl_lcd_gcode[20];
|
||||
queue.inject_P(PSTR("G28"));
|
||||
queue.inject_P(G28_STR);
|
||||
#if HAS_HEATED_BED
|
||||
sprintf_P(ubl_lcd_gcode, PSTR("M190 S%i"), custom_bed_temp);
|
||||
lcd_enqueue_one_now(ubl_lcd_gcode);
|
||||
@ -195,7 +195,7 @@ void _lcd_ubl_validate_custom_mesh() {
|
||||
#endif
|
||||
;
|
||||
sprintf_P(ubl_lcd_gcode, PSTR("G26 C B%i H%i P"), temp, custom_hotend_temp);
|
||||
lcd_enqueue_one_now_P(PSTR("G28"));
|
||||
lcd_enqueue_one_now_P(G28_STR);
|
||||
lcd_enqueue_one_now(ubl_lcd_gcode);
|
||||
}
|
||||
|
||||
@ -519,7 +519,7 @@ void _lcd_ubl_output_map_lcd() {
|
||||
void _lcd_ubl_output_map_lcd_cmd() {
|
||||
if (!all_axes_known()) {
|
||||
set_all_unhomed();
|
||||
queue.inject_P(PSTR("G28"));
|
||||
queue.inject_P(G28_STR);
|
||||
}
|
||||
ui.goto_screen(_lcd_ubl_map_homing);
|
||||
}
|
||||
|
Reference in New Issue
Block a user