Kaynağa Gözat

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

Dave Johnson 7 yıl önce
ebeveyn
işleme
554e577676
2 değiştirilmiş dosya ile 10 ekleme ve 8 silme
  1. 8
    6
      Marlin/src/gcode/queue.cpp
  2. 2
    2
      Marlin/src/inc/SanityCheck.h

+ 8
- 6
Marlin/src/gcode/queue.cpp Dosyayı Görüntüle

@@ -463,13 +463,15 @@ void advance_command_queue() {
463 463
         card.closefile();
464 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 476
         ok_to_send();
475 477
       }

+ 2
- 2
Marlin/src/inc/SanityCheck.h Dosyayı Görüntüle

@@ -275,8 +275,8 @@
275 275
   #elif TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
276 276
     #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
277 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 280
 #endif
281 281
 
282 282
 /**

Loading…
İptal
Kaydet