mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Update LedDeviceAPA102.cpp
Former-commit-id: f0b04ded96a9c9b99c2329e7889917645065382d
This commit is contained in:
parent
98d55e8cfc
commit
1c41919c08
@ -26,12 +26,12 @@ int LedDeviceAPA102::write(const std::vector<ColorRgb> &ledValues)
|
||||
const unsigned int mLedCount = (ledValues.size() * 4) + startFrameSize + endFrameSize;
|
||||
if(_ledBuffer.size() != mLedCount){
|
||||
_ledBuffer.resize(mLedCount, 0xFF);
|
||||
_ledBuffer[0] = 0x00;
|
||||
_ledBuffer[1] = 0x00;
|
||||
_ledBuffer[2] = 0x00;
|
||||
_ledBuffer[3] = 0x00;
|
||||
}
|
||||
|
||||
for (unsigned iLed=0; iLed<startFrameSize; ++iLed) {
|
||||
_ledBuffer[iLed] = 0x00;
|
||||
}
|
||||
|
||||
for (unsigned iLed=1; iLed<=ledValues.size(); ++iLed) {
|
||||
const ColorRgb& rgb = ledValues[iLed-1];
|
||||
_ledBuffer[iLed*4] = 0xFF;
|
||||
|
Loading…
Reference in New Issue
Block a user