Reduce some G-code strings

This commit is contained in:
Scott Lahteine 2021-01-16 23:15:43 -06:00
parent 522c78b5e6
commit 7836b85c96

View File

@ -139,8 +139,8 @@ void _lcd_ubl_custom_mesh() {
* UBL Adjust Mesh Height Command
*/
void _lcd_ubl_adjust_height_cmd() {
char ubl_lcd_gcode[16];
const int ind = ubl_height_amount > 0 ? 9 : 10;
char ubl_lcd_gcode[13];
const int ind = ubl_height_amount > 0 ? 6 : 7;
strcpy_P(ubl_lcd_gcode, PSTR("G29P6C-"));
sprintf_P(&ubl_lcd_gcode[ind], PSTR(".%i"), ABS(ubl_height_amount));
queue.inject(ubl_lcd_gcode);
@ -187,7 +187,7 @@ void _lcd_ubl_edit_mesh() {
* UBL Validate Custom Mesh Command
*/
void _lcd_ubl_validate_custom_mesh() {
char ubl_lcd_gcode[24];
char ubl_lcd_gcode[20];
sprintf_P(ubl_lcd_gcode, PSTR("G28\nG26CPH%" PRIi16 TERN_(HAS_HEATED_BED, "B%" PRIi16))
, custom_hotend_temp
#if HAS_HEATED_BED