🎨 Standardize G-code reporting
This commit is contained in:
committed by
Scott Lahteine
parent
a596faf4e5
commit
6d96c221bd
@ -60,4 +60,23 @@ void GcodeSuite::M145() {
|
||||
}
|
||||
}
|
||||
|
||||
void GcodeSuite::M145_report(const bool forReplay/*=true*/) {
|
||||
report_heading(forReplay, PSTR(STR_MATERIAL_HEATUP));
|
||||
LOOP_L_N(i, PREHEAT_COUNT) {
|
||||
report_echo_start(forReplay);
|
||||
SERIAL_ECHOLNPAIR_P(
|
||||
PSTR(" M145 S"), i
|
||||
#if HAS_HOTEND
|
||||
, PSTR(" H"), parser.to_temp_units(ui.material_preset[i].hotend_temp)
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
, SP_B_STR, parser.to_temp_units(ui.material_preset[i].bed_temp)
|
||||
#endif
|
||||
#if HAS_FAN
|
||||
, PSTR(" F"), ui.material_preset[i].fan_speed
|
||||
#endif
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PREHEAT_COUNT
|
||||
|
@ -19,7 +19,6 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if HAS_LCD_CONTRAST
|
||||
@ -31,8 +30,15 @@
|
||||
* M250: Read and optionally set the LCD contrast
|
||||
*/
|
||||
void GcodeSuite::M250() {
|
||||
if (parser.seen('C')) ui.set_contrast(parser.value_int());
|
||||
SERIAL_ECHOLNPAIR("LCD Contrast: ", ui.contrast);
|
||||
if (parser.seenval('C'))
|
||||
ui.set_contrast(parser.value_int());
|
||||
else
|
||||
M250_report();
|
||||
}
|
||||
|
||||
void GcodeSuite::M250_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_LCD_CONTRAST));
|
||||
SERIAL_ECHOLNPAIR(" M250 C", ui.contrast);
|
||||
}
|
||||
|
||||
#endif // HAS_LCD_CONTRAST
|
||||
|
@ -30,8 +30,15 @@
|
||||
* M256: Set the LCD brightness
|
||||
*/
|
||||
void GcodeSuite::M256() {
|
||||
if (parser.seenval('B')) ui.set_brightness(parser.value_int());
|
||||
SERIAL_ECHOLNPAIR("LCD Brightness: ", ui.brightness);
|
||||
if (parser.seenval('B'))
|
||||
ui.set_brightness(parser.value_int());
|
||||
else
|
||||
M256_report();
|
||||
}
|
||||
|
||||
void GcodeSuite::M256_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_LCD_BRIGHTNESS));
|
||||
SERIAL_ECHOLNPAIR(" M256 B", ui.brightness);
|
||||
}
|
||||
|
||||
#endif // HAS_LCD_BRIGHTNESS
|
||||
|
@ -38,7 +38,14 @@ void GcodeSuite::M414() {
|
||||
|
||||
if (parser.seenval('S'))
|
||||
ui.set_language(parser.value_byte());
|
||||
else
|
||||
M414_report();
|
||||
|
||||
}
|
||||
|
||||
void GcodeSuite::M414_report(const bool forReplay/*=true*/) {
|
||||
report_heading_etc(forReplay, PSTR(STR_UI_LANGUAGE));
|
||||
SERIAL_ECHOLNPAIR(" M414 S", ui.language);
|
||||
}
|
||||
|
||||
#endif // HAS_MULTI_LANGUAGE
|
||||
|
Reference in New Issue
Block a user