浏览代码

SERIAL_STATS_* features not supported on USBCON targets (#9127)

Dave Johnson 7 年前
父节点
当前提交
554e577676
共有 2 个文件被更改,包括 10 次插入8 次删除
  1. 8
    6
      Marlin/src/gcode/queue.cpp
  2. 2
    2
      Marlin/src/inc/SanityCheck.h

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

463
         card.closefile();
463
         card.closefile();
464
         SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
464
         SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
465
 
465
 
466
-        #if ENABLED(SERIAL_STATS_DROPPED_RX)
467
-          SERIAL_ECHOLNPAIR("Dropped bytes: ", customizedSerial.dropped());
468
-        #endif
466
+        #ifndef USBCON
467
+          #if ENABLED(SERIAL_STATS_DROPPED_RX)
468
+            SERIAL_ECHOLNPAIR("Dropped bytes: ", customizedSerial.dropped());
469
+          #endif
469
 
470
 
470
-        #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
471
-          SERIAL_ECHOLNPAIR("Max RX Queue Size: ", customizedSerial.rxMaxEnqueued());
472
-        #endif
471
+          #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
472
+            SERIAL_ECHOLNPAIR("Max RX Queue Size: ", customizedSerial.rxMaxEnqueued());
473
+          #endif
474
+        #endif // !USBCON
473
 
475
 
474
         ok_to_send();
476
         ok_to_send();
475
       }
477
       }

+ 2
- 2
Marlin/src/inc/SanityCheck.h 查看文件

275
   #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
275
   #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
276
     #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
276
     #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
277
   #endif
277
   #endif
278
-#elif ENABLED(SERIAL_XON_XOFF)
279
-  #error "SERIAL_XON_XOFF is not supported on USB-native AVR devices."
278
+#elif ENABLED(SERIAL_XON_XOFF) || ENABLED(SERIAL_STATS_MAX_RX_QUEUED) || ENABLED(SERIAL_STATS_DROPPED_RX)
279
+  #error "SERIAL_XON_XOFF and SERIAL_STATS_* features not supported on USB-native AVR devices."
280
 #endif
280
 #endif
281
 
281
 
282
 /**
282
 /**

正在加载...
取消
保存