mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Merge pull request #364 from AEtHeLsYn/master
End Frame fixed (Issue #361) Former-commit-id: b5be5f6b8325a990f50cab434f067617f9733ae0
This commit is contained in:
commit
cc5b57e4c0
@ -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…
x
Reference in New Issue
Block a user