浏览代码

Workaround for Pronterface M29

Scott Lahteine 6 年前
父节点
当前提交
cb6454118c
共有 1 个文件被更改,包括 10 次插入6 次删除
  1. 10
    6
      Marlin/src/gcode/queue.cpp

+ 10
- 6
Marlin/src/gcode/queue.cpp 查看文件

350
           gcode_LastN = gcode_N;
350
           gcode_LastN = gcode_N;
351
         }
351
         }
352
         #if ENABLED(SDSUPPORT)
352
         #if ENABLED(SDSUPPORT)
353
-          else if (card.saving)
353
+          else if (card.saving && strcmp(command, "M29") != 0) // No line number with M29 in Pronterface
354
             return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
354
             return gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM), i);
355
         #endif
355
         #endif
356
 
356
 
358
         if (IsStopped()) {
358
         if (IsStopped()) {
359
           char* gpos = strchr(command, 'G');
359
           char* gpos = strchr(command, 'G');
360
           if (gpos) {
360
           if (gpos) {
361
-            const int codenum = strtol(gpos + 1, NULL, 10);
362
-            switch (codenum) {
361
+            switch (strtol(gpos + 1, NULL, 10)) {
363
               case 0:
362
               case 0:
364
               case 1:
363
               case 1:
365
-              case 2:
366
-              case 3:
367
-                SERIAL_ERRORLNPGM_P(i, MSG_ERR_STOPPED);
364
+              #if ENABLED(ARC_SUPPORT)
365
+                case 2:
366
+                case 3:
367
+              #endif
368
+              #if ENABLED(BEZIER_CURVE_SUPPORT)
369
+                case 5:
370
+              #endif
371
+                SERIAL_ERRORLNPGM(MSG_ERR_STOPPED);
368
                 LCD_MESSAGEPGM(MSG_STOPPED);
372
                 LCD_MESSAGEPGM(MSG_STOPPED);
369
                 break;
373
                 break;
370
             }
374
             }

正在加载...
取消
保存