mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Offset 1 instead of zero to accomodate for the command byte
Former-commit-id: 1387556d239554f935708f48e7cd2a476ed9b6f5
This commit is contained in:
parent
d9a66b3e6d
commit
fa1157c3ee
@ -200,9 +200,10 @@ int LedDeviceLightpack::write(const std::vector<ColorRgb> &ledValues)
|
|||||||
const ColorRgb & color = ledValues[i];
|
const ColorRgb & color = ledValues[i];
|
||||||
|
|
||||||
// copy the most significant bits of the rgb values to the first three bytes
|
// copy the most significant bits of the rgb values to the first three bytes
|
||||||
_ledBuffer[6*i] = color.red;
|
// offset 1 to accomodate for the command byte
|
||||||
_ledBuffer[6*i+1] = color.green;
|
_ledBuffer[6*i+1] = color.red;
|
||||||
_ledBuffer[6*i+2] = color.blue;
|
_ledBuffer[6*i+2] = color.green;
|
||||||
|
_ledBuffer[6*i+3] = color.blue;
|
||||||
|
|
||||||
// leave the next three bytes on zero...
|
// leave the next three bytes on zero...
|
||||||
// 12-bit values have zeros in the lowest 4 bits which is almost correct, but it saves extra
|
// 12-bit values have zeros in the lowest 4 bits which is almost correct, but it saves extra
|
||||||
|
Loading…
Reference in New Issue
Block a user