Make packets with version < 9 group 1

This commit is contained in:
cschwinne 2021-08-24 23:59:09 +02:00
parent a7bfd0af41
commit 542d6361f2

View File

@ -225,7 +225,10 @@ void handleNotifications()
byte version = udpIn[11];
// if we are not part of any sync group ignore message
if (version > 8 && !(receiveGroups & udpIn[36])) return;
if (version < 9 || version > 199) {
// legacy senders are treated as if sending in sync group 1 only
if (!(receiveGroups & 0x01)) return;
} else if (!(receiveGroups & udpIn[36])) return;
bool someSel = (receiveNotificationBrightness || receiveNotificationColor || receiveNotificationEffects);
//apply colors from notification
@ -270,7 +273,7 @@ void handleNotifications()
}
//adjust system time, but only if sender is more accurate than self
if (version > 7)
if (version > 7 && version < 200)
{
Toki::Time tm;
tm.sec = (udpIn[30] << 24) | (udpIn[31] << 16) | (udpIn[32] << 8) | (udpIn[33]);