Browse Source

Merge pull request #3108 from AnHardt/M110+

M110 and M29 rework
Scott Lahteine 8 years ago
parent
commit
b7928a000a
1 changed files with 16 additions and 4 deletions
  1. 16
    4
      Marlin/Marlin_main.cpp

+ 16
- 4
Marlin/Marlin_main.cpp View File

@@ -756,6 +756,7 @@ void loop() {
756 756
           // M29 closes the file
757 757
           card.closefile();
758 758
           SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
759
+          ok_to_send();
759 760
         }
760 761
         else {
761 762
           // Write the string from the read buffer to SD
@@ -763,7 +764,7 @@ void loop() {
763 764
           if (card.logging)
764 765
             process_next_command(); // The card is saving because it's logging
765 766
           else
766
-            SERIAL_PROTOCOLLNPGM(MSG_OK);
767
+            ok_to_send();
767 768
         }
768 769
       }
769 770
       else
@@ -4053,6 +4054,13 @@ inline void gcode_M109() {
4053 4054
 #endif // HAS_TEMP_BED
4054 4055
 
4055 4056
 /**
4057
+ * M110: Set Current Line Number
4058
+ */
4059
+inline void gcode_M110() {
4060
+  if (code_seen('N')) gcode_N = code_value_long();
4061
+}
4062
+
4063
+/**
4056 4064
  * M111: Set the debug level
4057 4065
  */
4058 4066
 inline void gcode_M111() {
@@ -5926,6 +5934,10 @@ void process_next_command() {
5926 5934
         gcode_M104();
5927 5935
         break;
5928 5936
 
5937
+      case 110: // M110: Set Current Line Number
5938
+        gcode_M110();
5939
+        break;
5940
+
5929 5941
       case 111: // M111: Set debug level
5930 5942
         gcode_M111();
5931 5943
         break;
@@ -7173,9 +7185,9 @@ void kill(const char* lcd_msg) {
7173 7185
   cli();   // disable interrupts
7174 7186
   suicide();
7175 7187
   while (1) {
7176
-	#if ENABLED(USE_WATCHDOG)
7177
-	  watchdog_reset();
7178
-	#endif
7188
+    #if ENABLED(USE_WATCHDOG)
7189
+      watchdog_reset();
7190
+    #endif
7179 7191
   } // Wait for reset
7180 7192
 }
7181 7193
 

Loading…
Cancel
Save