Browse Source

Fix M503 S parameter

Scott Lahteine 7 years ago
parent
commit
a4e1d83599

+ 1
- 1
Marlin/src/gcode/eeprom/M500-M503.cpp View File

51
    * M503: print settings currently in memory
51
    * M503: print settings currently in memory
52
    */
52
    */
53
   void GcodeSuite::M503() {
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
 #endif // !DISABLE_M503
57
 #endif // !DISABLE_M503

+ 1
- 1
Marlin/src/module/configuration_store.cpp View File

1527
    *
1527
    *
1528
    * Unless specifically disabled, M503 is available even without EEPROM
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
      * Announce current units, in case inches are being displayed
1533
      * Announce current units, in case inches are being displayed

+ 2
- 2
Marlin/src/module/configuration_store.h View File

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

Loading…
Cancel
Save