Browse Source

Fix M503 S parameter

Scott Lahteine 7 years ago
parent
commit
6e197d4a42
3 changed files with 4 additions and 4 deletions
  1. 1
    1
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/configuration_store.cpp
  3. 2
    2
      Marlin/configuration_store.h

+ 1
- 1
Marlin/Marlin_main.cpp View File

9917
    * M503: print settings currently in memory
9917
    * M503: print settings currently in memory
9918
    */
9918
    */
9919
   inline void gcode_M503() {
9919
   inline void gcode_M503() {
9920
-    (void)settings.report(parser.boolval('S'));
9920
+    (void)settings.report(parser.seen('S') && !parser.value_bool());
9921
   }
9921
   }
9922
 #endif
9922
 #endif
9923
 
9923
 

+ 1
- 1
Marlin/configuration_store.cpp View File

1547
    *
1547
    *
1548
    * Unless specifically disabled, M503 is available even without EEPROM
1548
    * Unless specifically disabled, M503 is available even without EEPROM
1549
    */
1549
    */
1550
-  void MarlinSettings::report(bool forReplay) {
1550
+  void MarlinSettings::report(const bool forReplay) {
1551
 
1551
 
1552
     /**
1552
     /**
1553
      * Announce current units, in case inches are being displayed
1553
      * Announce current units, in case inches are being displayed

+ 2
- 2
Marlin/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