bugfix for outgoing serial TPM2 message length (#2628)

bugfix for outgoing serial TPM2 message length
This commit is contained in:
ChuckMash 2022-04-12 01:20:08 -07:00 committed by GitHub
parent 9cd8acab43
commit d1f76042e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,8 +86,8 @@ void handleSerial()
Serial.write(0xC9); Serial.write(0xDA);
uint16_t used = strip.getLengthTotal();
uint16_t len = used*3;
Serial.write((len << 8) & 0xFF);
Serial.write( len & 0xFF);
Serial.write(highByte(len));
Serial.write(lowByte(len));
for (uint16_t i=0; i < used; i++) {
uint32_t c = strip.getPixelColor(i);
Serial.write(qadd8(W(c), R(c))); //R, add white channel to RGB channels as a simple RGBW -> RGB map