Merge remote-tracking branch 'upstream/mdev' into mdev

This commit is contained in:
Brandon502
2024-05-30 18:40:18 -04:00
5 changed files with 9 additions and 1 deletions

View File

@@ -2490,7 +2490,8 @@ build_unflags = ${env:esp32S3_8MB_M.build_unflags} ;; use the same as "normal"
build_flags = ${common.build_flags} ${esp32s3.build_flags} -Wno-misleading-indentation -Wno-format-truncation
${common_mm.build_flags_S}
-D WLED_RELEASE_NAME=matrixportal_esp32s3
-DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=1 ;; for Hardware-CDC USB mode
; Serial debug enabled -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=1 ;; for Hardware-CDC USB mode
-D ARDUINO_USB_CDC_ON_BOOT=0
-D WLED_DISABLE_ADALIGHT ;; disables serial protocols - recommended for Hardware-CDC USB (Serial RX will receive junk commands when RX pin is unconnected, unless its pulled down by resistor)
${common_mm.animartrix_build_flags}
${common_mm.build_disable_sync_interfaces}

View File

@@ -543,6 +543,8 @@ void show_psram_info_part2(void)
void showRealSpeed() {
//Serial.begin(115200);
if (!Serial) return; // Avoid writing to unconnected USB-CDC
Serial.flush();
Serial.println(F("\n"));
for(int aa=0; aa<65; aa++) Serial.print("="); Serial.println();

View File

@@ -322,6 +322,8 @@ class AutoPlaylistUsermod : public Usermod {
if (bri == 0) return;
if(!functionality_enabled) return;
um_data_t *um_data;
if (!usermods.getUMData(&um_data, USERMOD_ID_AUDIOREACTIVE)) {

View File

@@ -50,6 +50,7 @@ void handleImprovPacket() {
uint8_t rpcCommandType = 0;
char rpcData[128];
rpcData[0] = 0;
if (!Serial) return; // WLEDMM avoid reading from unconnected USB-CDC
while (!timeout) {
if (Serial.available() < 1) {

View File

@@ -42,6 +42,7 @@ void updateBaudRate(uint32_t rate){
// RGB LED data return as JSON array. Slow, but easy to use on the other end.
void sendJSON(){
if (!pinManager.isPinAllocated(hardwareTX) || pinManager.getPinOwner(hardwareTX) == PinOwner::DebugOut) {
if (!Serial) return; // WLEDMM avoid writing to unconnected USB-CDC
uint16_t used = strip.getLengthTotal();
Serial.write('[');
for (uint16_t i=0; i<used; i++) {
@@ -55,6 +56,7 @@ void sendJSON(){
// RGB LED data returned as bytes in TPM2 format. Faster, and slightly less easy to use on the other end.
void sendBytes(){
if (!pinManager.isPinAllocated(hardwareTX) || pinManager.getPinOwner(hardwareTX) == PinOwner::DebugOut) {
if (!Serial) return; // WLEDMM avoid writing to unconnected USB-CDC
Serial.write(0xC9); Serial.write(0xDA);
uint16_t used = strip.getLengthTotal();
uint16_t len = used*3;