mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Update LedDeviceAdalightApa102.cpp
Former-commit-id: fbf05206e681fc5979a7241bcb1ee716ec088757
This commit is contained in:
parent
958aa428a3
commit
98d55e8cfc
@ -27,7 +27,7 @@ int LedDeviceAdalightApa102::write(const std::vector<ColorRgb> & ledValues)
|
|||||||
const unsigned int endFrameSize = std::max<unsigned int>(((ledValues.size() + 15) / 16), 4);
|
const unsigned int endFrameSize = std::max<unsigned int>(((ledValues.size() + 15) / 16), 4);
|
||||||
const unsigned int mLedCount = (ledValues.size() * 4) + startFrameSize + endFrameSize;
|
const unsigned int mLedCount = (ledValues.size() * 4) + startFrameSize + endFrameSize;
|
||||||
if(_ledBuffer.size() != mLedCount){
|
if(_ledBuffer.size() != mLedCount){
|
||||||
_ledBuffer.resize(mLedCount, 0x00);
|
_ledBuffer.resize(mLedCount, 0xFF);
|
||||||
_ledBuffer[0] = 'A';
|
_ledBuffer[0] = 'A';
|
||||||
_ledBuffer[1] = 'd';
|
_ledBuffer[1] = 'd';
|
||||||
_ledBuffer[2] = 'a';
|
_ledBuffer[2] = 'a';
|
||||||
|
Loading…
Reference in New Issue
Block a user