Merge pull request #1708 from Matchlighter/patch-1

Add DNRGBW Mode for Real Time UDP Control
This commit is contained in:
Aircoookie 2021-02-16 17:43:33 +01:00 committed by GitHub
commit 331844ff73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -315,6 +315,15 @@ void handleNotifications()
setRealtimePixel(id, udpIn[i], udpIn[i+1], udpIn[i+2], 0);
id++;
}
} else if (udpIn[0] == 5) //dnrgbw
{
uint16_t id = ((udpIn[3] << 0) & 0xFF) + ((udpIn[2] << 8) & 0xFF00);
for (uint16_t i = 4; i < packetSize -2; i += 4)
{
if (id >= ledCount) break;
setRealtimePixel(id, udpIn[i], udpIn[i+1], udpIn[i+2], udpIn[i+3]);
id++;
}
}
strip.show();
return;