Optimize common strings

Saves 128 bytes in testing with `mftest mega 1 -y`
This commit is contained in:
Scott Lahteine
2019-11-29 04:45:07 -06:00
parent 4d8e7cdb30
commit f83bc0aa13
28 changed files with 272 additions and 172 deletions

View File

@ -103,12 +103,17 @@ void GcodeSuite::M290() {
#if ENABLED(BABYSTEP_HOTEND_Z_OFFSET)
{
SERIAL_ECHOLNPAIR("Hotend ", int(active_extruder), "Offset"
#error "Hey!"
SERIAL_ECHOLNPAIR_P(
PSTR("Hotend "), int(active_extruder)
#if ENABLED(BABYSTEP_XY)
" X", hotend_offset[active_extruder].x,
" Y", hotend_offset[active_extruder].y,
, PSTR("Offset X"), hotend_offset[active_extruder].x
, SP_Y_STR, hotend_offset[active_extruder].y
, SP_Z_STR
#else
, PSTR("Offset Z")
#endif
" Z", hotend_offset[active_extruder].z
, hotend_offset[active_extruder].z
);
}
#endif
@ -119,12 +124,15 @@ void GcodeSuite::M290() {
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
{
SERIAL_ECHOLNPAIR("Babystep"
SERIAL_ECHOLNPAIR_P(
#if ENABLED(BABYSTEP_XY)
" X", babystep.axis_total[X_AXIS],
" Y", babystep.axis_total[Y_AXIS],
PSTR("Babystep X"), babystep.axis_total[X_AXIS]
, SP_Y_STR, babystep.axis_total[Y_AXIS]
, SP_Z_STR
#else
, PSTR("Babystep Z")
#endif
" Z", babystep.axis_total[BS_TODO_AXIS(Z_AXIS)]
, babystep.axis_total[BS_TODO_AXIS(Z_AXIS)]
);
}
#endif