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: 164b396f7d779d01e2fc1df80438ad817a0ac712
This commit is contained in:
parent
9d004fa36e
commit
958aa428a3
@ -25,7 +25,11 @@ int LedDeviceAPA102::write(const std::vector<ColorRgb> &ledValues)
|
||||
const unsigned int endFrameSize = std::max<unsigned int>(((ledValues.size() + 15) / 16), 4);
|
||||
const unsigned int mLedCount = (ledValues.size() * 4) + startFrameSize + endFrameSize;
|
||||
if(_ledBuffer.size() != mLedCount){
|
||||
_ledBuffer.resize(mLedCount, 0x00);
|
||||
_ledBuffer.resize(mLedCount, 0xFF);
|
||||
}
|
||||
|
||||
for (unsigned iLed=0; iLed<startFrameSize; ++iLed) {
|
||||
_ledBuffer[iLed] = 0x00;
|
||||
}
|
||||
|
||||
for (unsigned iLed=1; iLed<=ledValues.size(); ++iLed) {
|
||||
|
Loading…
Reference in New Issue
Block a user