瀏覽代碼

Require a checksum when writing to SD

From #10204 by @adriancuzman
Scott Lahteine 7 年之前
父節點
當前提交
3007eee22e
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. 6
    0
      Marlin/src/gcode/queue.cpp

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

@@ -341,6 +341,12 @@ inline void get_serial_commands() {
341 341
 
342 342
           gcode_LastN = gcode_N;
343 343
         }
344
+        #if ENABLED(SDSUPPORT)
345
+          else if (card.saving) {
346
+            gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM));
347
+            return;
348
+          }
349
+        #endif
344 350
 
345 351
         // Movement commands alert when stopped
346 352
         if (IsStopped()) {

Loading…
取消
儲存