mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Update LedDeviceTpm2.cpp
Former-commit-id: 8d51eb00044460002e29687468786e3056afd0bb
This commit is contained in:
parent
1d046ab35a
commit
3135b89255
@ -22,11 +22,11 @@ int LedDeviceTpm2::write(const std::vector<ColorRgb> &ledValues)
|
|||||||
{
|
{
|
||||||
if (_ledBuffer.size() == 0)
|
if (_ledBuffer.size() == 0)
|
||||||
{
|
{
|
||||||
_ledBuffer.resize(5 + 3*ledValues.size());
|
_ledBuffer.resize(5 + 3*ledValues.size());
|
||||||
_ledBuffer[0] = 0xC9; // block-start byte
|
_ledBuffer[0] = 0xC9; // block-start byte
|
||||||
_ledBuffer[1] = 0xDA; // DATA frame
|
_ledBuffer[1] = 0xDA; // DATA frame
|
||||||
_ledBuffer[2] = ((3 * ledValues.size()) >> 8) & 0xFF; // LED count high byte
|
_ledBuffer[2] = ((3 * ledValues.size()) >> 8) & 0xFF; // frame size high byte
|
||||||
_ledBuffer[3] = (3 * ledValues.size()) & 0xFF; // LED count low byte
|
_ledBuffer[3] = (3 * ledValues.size()) & 0xFF; // frame size low byte
|
||||||
_ledBuffer.back() = 0x36; // block-end byte
|
_ledBuffer.back() = 0x36; // block-end byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user