Browse Source

Fix M503 S parameter

pull/1/head
Scott Lahteine 7 years ago
parent
commit
a4e1d83599
  1. 2
      Marlin/src/gcode/eeprom/M500-M503.cpp
  2. 2
      Marlin/src/module/configuration_store.cpp
  3. 4
      Marlin/src/module/configuration_store.h

2
Marlin/src/gcode/eeprom/M500-M503.cpp

@ -51,7 +51,7 @@ void GcodeSuite::M502() {
* M503: print settings currently in memory
*/
void GcodeSuite::M503() {
(void)settings.report(parser.boolval('S'));
(void)settings.report(parser.seen('S') && !parser.value_bool());
}
#endif // !DISABLE_M503

2
Marlin/src/module/configuration_store.cpp

@ -1527,7 +1527,7 @@ void MarlinSettings::reset() {
*
* Unless specifically disabled, M503 is available even without EEPROM
*/
void MarlinSettings::report(bool forReplay) {
void MarlinSettings::report(const bool forReplay) {
/**
* Announce current units, in case inches are being displayed

4
Marlin/src/module/configuration_store.h

@ -52,10 +52,10 @@ class MarlinSettings {
#endif
#if DISABLED(DISABLE_M503)
static void report(bool forReplay=false);
static void report(const bool forReplay=false);
#else
FORCE_INLINE
static void report(bool forReplay=false) { UNUSED(forReplay); }
static void report(const bool forReplay=false) { UNUSED(forReplay); }
#endif
private:

Loading…
Cancel
Save