Save some string flash
This commit is contained in:
@ -121,7 +121,7 @@ void StressTestScreen::onIdle() {
|
||||
|
||||
if (!commandsInQueue()) {
|
||||
if (!isPositionKnown()) {
|
||||
injectCommands_P(PSTR("G28"));
|
||||
injectCommands_P(G28_STR);
|
||||
} else {
|
||||
injectCommands_P(PSTR(
|
||||
"G0 X100 Y100 Z100 F6000\n"
|
||||
|
@ -248,7 +248,7 @@ void process_lcd_p_command(const char* command) {
|
||||
ExtUI::stopPrint();
|
||||
write_to_lcd_P(PSTR("{SYS:STARTED}"));
|
||||
break;
|
||||
case 'H': queue.enqueue_now_P(PSTR("G28")); break; // Home all axes
|
||||
case 'H': queue.enqueue_now_P(G28_STR); break; // Home all axes
|
||||
default: {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
// Print file 000 - a three digit number indicating which
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -464,7 +464,7 @@ bool MarlinUI::get_blink() {
|
||||
|
||||
#endif // HAS_LCD_MENU
|
||||
|
||||
if (!homed && RRK(EN_KEYPAD_F1)) queue.inject_P(PSTR("G28"));
|
||||
if (!homed && RRK(EN_KEYPAD_F1)) queue.inject_P(G28_STR);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1530,7 +1530,7 @@ void MarlinUI::update() {
|
||||
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
||||
wait_for_heatup = wait_for_user = false;
|
||||
#endif
|
||||
if (IS_SD_PAUSED()) queue.inject_P(PSTR("M24"));
|
||||
if (IS_SD_PAUSED()) queue.inject_P(M24_STR);
|
||||
#ifdef ACTION_ON_RESUME
|
||||
host_action_resume();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user