From 43b0da03aa3f2aa236669eec3a210991f645103d Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sat, 15 Nov 2025 23:15:44 +0100 Subject: [PATCH] Update debug messages for USB mode detection --- pio-scripts/conditional_usb_mode.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pio-scripts/conditional_usb_mode.py b/pio-scripts/conditional_usb_mode.py index ca88ffda..a851648f 100644 --- a/pio-scripts/conditional_usb_mode.py +++ b/pio-scripts/conditional_usb_mode.py @@ -131,14 +131,17 @@ def conditional_usb_mode(env): has_cdc_boot = has_cdc_on_boot_enabled(env) if has_usb_mode and has_cdc_boot: - print("Development build detected - keeping ARDUINO_USB_MODE=1 for debugging") + print("Development build detected - keeping ARDUINO_USB_MODE=1 for USB-OTG debugging") # Warning in orange/yellow using ANSI color codes print("\033[93m WARNING: This build is NOT suitable for production devices!\033[0m") print("\033[93m Production builds require WLED_RELEASE=True environment variable.\033[0m") + elif has_cdc_boot: + # CDC_ON_BOOT=1 present but not USB_MODE=1 + print("Development build detected - USB-OTG enabled, but ARDUINO_USB_MODE=1 missing for debugging.") elif has_usb_mode: # USB_MODE=1 present but not CDC_ON_BOOT=1 (UART-to-USB board) print("Development build detected - board has UART-to-USB chip") # If neither flag is present, don't print anything # Apply the conditional USB mode logic -conditional_usb_mode(env) \ No newline at end of file +conditional_usb_mode(env)