mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Added debug logging of the Ada header bytes that are sent (#238)
[HYPERIOND LedDevice] <DEBUG> <LedDeviceAdalight.cpp:52:write()> Adalight header for 316 leds: Ada 0x01 0x3b 0x6f
This commit is contained in:
parent
adfe2a4b23
commit
52283b3257
@ -41,6 +41,15 @@ int LedDeviceAdalight::write(const std::vector<ColorRgb> & ledValues)
|
||||
_ledBuffer[3] = ((ledValues.size() - 1) >> 8) & 0xFF; // LED count high byte
|
||||
_ledBuffer[4] = (ledValues.size() - 1) & 0xFF; // LED count low byte
|
||||
_ledBuffer[5] = _ledBuffer[3] ^ _ledBuffer[4] ^ 0x55; // Checksum
|
||||
Debug( _log, "Adalight header for %d leds: %c%c%c 0x%02x 0x%02x 0x%02x",
|
||||
ledValues.size(),
|
||||
_ledBuffer[0],
|
||||
_ledBuffer[1],
|
||||
_ledBuffer[2],
|
||||
_ledBuffer[3],
|
||||
_ledBuffer[4],
|
||||
_ledBuffer[5]
|
||||
);
|
||||
}
|
||||
|
||||
// restart the timer
|
||||
|
@ -39,6 +39,15 @@ int LedDeviceAdalightApa102::write(const std::vector<ColorRgb> & ledValues)
|
||||
_ledBuffer[3] = (((unsigned int)(ledValues.size())) >> 8) & 0xFF; // LED count high byte
|
||||
_ledBuffer[4] = ((unsigned int)(ledValues.size())) & 0xFF; // LED count low byte
|
||||
_ledBuffer[5] = _ledBuffer[3] ^ _ledBuffer[4] ^ 0x55; // Checksum
|
||||
Debug( _log, "Adalight header for %d leds: %c%c%c 0x%02x 0x%02x 0x%02x",
|
||||
ledValues.size(),
|
||||
_ledBuffer[0],
|
||||
_ledBuffer[1],
|
||||
_ledBuffer[2],
|
||||
_ledBuffer[3],
|
||||
_ledBuffer[4],
|
||||
_ledBuffer[5]
|
||||
);
|
||||
}
|
||||
|
||||
for (signed iLed=1; iLed<=_ledCount; iLed++) {
|
||||
|
Loading…
Reference in New Issue
Block a user