UDP parsePacket() with sync disabled

This commit is contained in:
cschwinne 2020-12-02 22:47:31 +01:00
parent 51acd4952b
commit bc96ca48b6
3 changed files with 12 additions and 4 deletions

View File

@ -2,6 +2,11 @@
### WLED version 0.11.0
#### Build 2012020
- UDP `parsePacket()` with sync disabled (#1390)
- Added Multi RGBW DMX mode (PR #1383)
#### Build 2012010
- Fixed compilation for analog (PWM) LEDs

View File

@ -123,7 +123,7 @@ void handleNotifications()
}
//receive UDP notifications
if (!udpConnected || !(receiveNotifications || receiveDirect)) return;
if (!udpConnected) return;
bool isSupp = false;
uint16_t packetSize = notifierUdp.parsePacket();
@ -156,15 +156,17 @@ void handleNotifications()
}
}
if (!(receiveNotifications || receiveDirect)) return;
//notifier and UDP realtime
if (!packetSize || packetSize > UDP_IN_MAXSIZE) return;
if (!isSupp && notifierUdp.remoteIP() == Network.localIP()) return; //don't process broadcasts we send ourselves
if (!isSupp && notifierUdp.remoteIP() == Network.localIP()) return; //don't process broadcasts we send ourselves
uint8_t udpIn[packetSize +1];
if (isSupp) notifier2Udp.read(udpIn, packetSize);
else notifierUdp.read(udpIn, packetSize);
//wled notifier, block if realtime packets active
//wled notifier, ignore if realtime packets active
if (udpIn[0] == 0 && !realtimeMode && receiveNotifications)
{
//ignore notification if received within a second after sending a notification ourselves
@ -223,6 +225,7 @@ void handleNotifications()
colorUpdated(NOTIFIER_CALL_MODE_NOTIFICATION);
return;
}
if (!receiveDirect) return;
//TPM2.NET

View File

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2012010
#define VERSION 2012020
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG