Bläddra i källkod

Fix M503 S parameter

Scott Lahteine 6 år sedan
förälder
incheckning
a4e1d83599

+ 1
- 1
Marlin/src/gcode/eeprom/M500-M503.cpp Visa fil

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

+ 1
- 1
Marlin/src/module/configuration_store.cpp Visa fil

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

+ 2
- 2
Marlin/src/module/configuration_store.h Visa fil

@@ -52,10 +52,10 @@ class MarlinSettings {
52 52
     #endif
53 53
 
54 54
     #if DISABLED(DISABLE_M503)
55
-      static void report(bool forReplay=false);
55
+      static void report(const bool forReplay=false);
56 56
     #else
57 57
       FORCE_INLINE
58
-      static void report(bool forReplay=false) { UNUSED(forReplay); }
58
+      static void report(const bool forReplay=false) { UNUSED(forReplay); }
59 59
     #endif
60 60
 
61 61
   private:

Laddar…
Avbryt
Spara