Skip to content

Commit

Permalink
m221 report update
Browse files Browse the repository at this point in the history
Implemented M221 report on M503
  • Loading branch information
ThomasToka committed Jul 19, 2023
1 parent 6c4ef51 commit 0773c09
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,10 @@
#define SUPERSCRIPT_TWO TERN(NOT_EXTENDED_ISO10646_1_5X7, "^2", "²")
#define SUPERSCRIPT_THREE TERN(NOT_EXTENDED_ISO10646_1_5X7, "^3", "³")

#if ENABLED(E3S1PRO_RTS)
#define STR_FLOW_RATE "Extruder Flowrate"
#endif

#include "multi_language.h" // Allow multiple languages

#include "../lcd/language/language_en.h"
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/gcode/config/M221.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@ void GcodeSuite::M221() {
}
}

#if ENABLED(E3S1PRO_RTS)
void GcodeSuite::M221_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, F(STR_FLOW_RATE));
SERIAL_ECHOLNPGM(" M221 ", "S", planner.flow_percentage[0]," ; (%)");
}
#endif

#endif // EXTRUDERS
5 changes: 5 additions & 0 deletions Marlin/src/gcode/gcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,11 @@ class GcodeSuite {

#if HAS_EXTRUDERS
static void M221();

#if ENABLED(E3S1PRO_RTS)
static void M221_report(const bool forReplay=true);
#endif

#endif

#if ENABLED(DIRECT_PIN_CONTROL)
Expand Down
7 changes: 4 additions & 3 deletions Marlin/src/module/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3980,12 +3980,13 @@ void MarlinSettings::reset() {

#if ENABLED(E3S1PRO_RTS)
if (g_soundSetOffOn == 1 || g_soundSetOffOn == 0) {
SERIAL_ECHO_MSG(" Display sound: On");
SERIAL_ECHO_MSG(" Display sound: ON");
}
if(g_soundSetOffOn == 2){
SERIAL_ECHO_MSG(" Display sound: Off");
SERIAL_ECHO_MSG(" Display sound: OFF");
}
//SERIAL_ECHO_MSG(" x_min_pos_eeprom:", int(x_min_pos_eeprom));
TERN_(HAS_EXTRUDERS, gcode.M221_report(forReplay));
//SERIAL_ECHO_MSG(" x_min_pos_eeprom:", int(x_min_pos_eeprom));
//SERIAL_ECHO_MSG(" y_min_pos_eeprom:", int(y_min_pos_eeprom));
#endif

Expand Down

0 comments on commit 0773c09

Please sign in to comment.