Update debug messages for USB mode detection

This commit is contained in:
Frank
2025-11-15 23:15:44 +01:00
committed by GitHub
parent 0c92e573e1
commit 43b0da03aa

View File

@@ -131,14 +131,17 @@ def conditional_usb_mode(env):
has_cdc_boot = has_cdc_on_boot_enabled(env) has_cdc_boot = has_cdc_on_boot_enabled(env)
if has_usb_mode and has_cdc_boot: 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 # 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 WARNING: This build is NOT suitable for production devices!\033[0m")
print("\033[93m Production builds require WLED_RELEASE=True environment variable.\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: elif has_usb_mode:
# USB_MODE=1 present but not CDC_ON_BOOT=1 (UART-to-USB board) # USB_MODE=1 present but not CDC_ON_BOOT=1 (UART-to-USB board)
print("Development build detected - board has UART-to-USB chip") print("Development build detected - board has UART-to-USB chip")
# If neither flag is present, don't print anything # If neither flag is present, don't print anything
# Apply the conditional USB mode logic # Apply the conditional USB mode logic
conditional_usb_mode(env) conditional_usb_mode(env)