|
@@ -1751,9 +1751,15 @@ void kill_screen(const char* lcd_msg) {
|
1751
|
1751
|
* If the queue is full, the command will fail, so we have to loop
|
1752
|
1752
|
* with idle() to make sure the command has been enqueued.
|
1753
|
1753
|
*/
|
1754
|
|
- void lcd_enqueue_command_sram(char * const cmd) {
|
|
1754
|
+ void lcd_enqueue_command(char * const cmd) {
|
1755
|
1755
|
no_reentry = true;
|
1756
|
|
- while (enqueue_and_echo_command(cmd)) idle();
|
|
1756
|
+ enqueue_and_echo_command_now(cmd);
|
|
1757
|
+ no_reentry = false;
|
|
1758
|
+ }
|
|
1759
|
+
|
|
1760
|
+ void lcd_enqueue_commands_P(const char * const cmd) {
|
|
1761
|
+ no_reentry = true;
|
|
1762
|
+ enqueue_and_echo_commands_P_now(cmd);
|
1757
|
1763
|
no_reentry = false;
|
1758
|
1764
|
}
|
1759
|
1765
|
|
|
@@ -2082,10 +2088,10 @@ void kill_screen(const char* lcd_msg) {
|
2082
|
2088
|
enqueue_and_echo_commands_P(PSTR("G28"));
|
2083
|
2089
|
#if HAS_TEMP_BED
|
2084
|
2090
|
sprintf_P(UBL_LCD_GCODE, PSTR("M190 S%i"), custom_bed_temp);
|
2085
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2091
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2086
|
2092
|
#endif
|
2087
|
2093
|
sprintf_P(UBL_LCD_GCODE, PSTR("M109 S%i"), custom_hotend_temp);
|
2088
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2094
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2089
|
2095
|
enqueue_and_echo_commands_P(PSTR("G29 P1"));
|
2090
|
2096
|
}
|
2091
|
2097
|
|
|
@@ -2116,7 +2122,7 @@ void kill_screen(const char* lcd_msg) {
|
2116
|
2122
|
const int ind = ubl_height_amount > 0 ? 9 : 10;
|
2117
|
2123
|
strcpy_P(UBL_LCD_GCODE, PSTR("G29 P6 C -"));
|
2118
|
2124
|
sprintf_P(&UBL_LCD_GCODE[ind], PSTR(".%i"), abs(ubl_height_amount));
|
2119
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2125
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2120
|
2126
|
}
|
2121
|
2127
|
|
2122
|
2128
|
/**
|
|
@@ -2167,8 +2173,8 @@ void kill_screen(const char* lcd_msg) {
|
2167
|
2173
|
#endif
|
2168
|
2174
|
;
|
2169
|
2175
|
sprintf_P(UBL_LCD_GCODE, PSTR("G26 C B%i H%i P"), temp, custom_hotend_temp);
|
2170
|
|
- lcd_enqueue_command_sram("G28");
|
2171
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2176
|
+ lcd_enqueue_commands_P(PSTR("G28"));
|
|
2177
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2172
|
2178
|
}
|
2173
|
2179
|
|
2174
|
2180
|
/**
|
|
@@ -2201,7 +2207,7 @@ void kill_screen(const char* lcd_msg) {
|
2201
|
2207
|
void _lcd_ubl_grid_level_cmd() {
|
2202
|
2208
|
char UBL_LCD_GCODE[10];
|
2203
|
2209
|
sprintf_P(UBL_LCD_GCODE, PSTR("G29 J%i"), side_points);
|
2204
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2210
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2205
|
2211
|
}
|
2206
|
2212
|
|
2207
|
2213
|
/**
|
|
@@ -2242,7 +2248,7 @@ void kill_screen(const char* lcd_msg) {
|
2242
|
2248
|
void _lcd_ubl_fillin_amount_cmd() {
|
2243
|
2249
|
char UBL_LCD_GCODE[16];
|
2244
|
2250
|
sprintf_P(UBL_LCD_GCODE, PSTR("G29 P3 R C.%i"), ubl_fillin_amount);
|
2245
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2251
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2246
|
2252
|
}
|
2247
|
2253
|
|
2248
|
2254
|
/**
|
|
@@ -2334,7 +2340,7 @@ void kill_screen(const char* lcd_msg) {
|
2334
|
2340
|
void _lcd_ubl_load_mesh_cmd() {
|
2335
|
2341
|
char UBL_LCD_GCODE[10];
|
2336
|
2342
|
sprintf_P(UBL_LCD_GCODE, PSTR("G29 L%i"), ubl_storage_slot);
|
2337
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2343
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2338
|
2344
|
enqueue_and_echo_commands_P(PSTR("M117 " MSG_MESH_LOADED "."));
|
2339
|
2345
|
}
|
2340
|
2346
|
|
|
@@ -2344,7 +2350,7 @@ void kill_screen(const char* lcd_msg) {
|
2344
|
2350
|
void _lcd_ubl_save_mesh_cmd() {
|
2345
|
2351
|
char UBL_LCD_GCODE[10];
|
2346
|
2352
|
sprintf_P(UBL_LCD_GCODE, PSTR("G29 S%i"), ubl_storage_slot);
|
2347
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2353
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2348
|
2354
|
enqueue_and_echo_commands_P(PSTR("M117 " MSG_MESH_SAVED "."));
|
2349
|
2355
|
}
|
2350
|
2356
|
|
|
@@ -2395,7 +2401,7 @@ void kill_screen(const char* lcd_msg) {
|
2395
|
2401
|
dtostrf(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]), 0, 2, str);
|
2396
|
2402
|
dtostrf(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]), 0, 2, str2);
|
2397
|
2403
|
snprintf_P(UBL_LCD_GCODE, sizeof(UBL_LCD_GCODE), PSTR("G29 P4 X%s Y%s R%i"), str, str2, n_edit_pts);
|
2398
|
|
- lcd_enqueue_command_sram(UBL_LCD_GCODE);
|
|
2404
|
+ lcd_enqueue_command(UBL_LCD_GCODE);
|
2399
|
2405
|
}
|
2400
|
2406
|
|
2401
|
2407
|
/**
|
|
@@ -3290,7 +3296,7 @@ void kill_screen(const char* lcd_msg) {
|
3290
|
3296
|
autotune_temp[e]
|
3291
|
3297
|
#endif
|
3292
|
3298
|
);
|
3293
|
|
- lcd_enqueue_command_sram(cmd);
|
|
3299
|
+ lcd_enqueue_command(cmd);
|
3294
|
3300
|
}
|
3295
|
3301
|
|
3296
|
3302
|
#endif // PID_AUTOTUNE_MENU
|