mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Update LedDeviceAPA102.cpp
End frame fixed Former-commit-id: 44107997d92d729f84adee368d12e35f1b5be6f1
This commit is contained in:
parent
e65ee859ec
commit
c9636aaa6b
@ -20,7 +20,9 @@ LedDeviceAPA102::LedDeviceAPA102(const std::string& outputDevice, const unsigned
|
||||
|
||||
int LedDeviceAPA102::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
const unsigned int mLedCount = (ledValues.size() * 4) + 8;
|
||||
const unsigned int startFrameSize = 4;
|
||||
const unsigned int endFrameSize = (ledValues.size() + 63) / 64 * 4;
|
||||
const unsigned int mLedCount = (ledValues.size() * 4) + startFrameSize + endFrameSize;
|
||||
if(_ledBuffer.size() != mLedCount){
|
||||
_ledBuffer.resize(mLedCount, 0x00);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user