mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Fix for sk9822 frame sufix (#1042)
This commit is contained in:
parent
0cddc06844
commit
9e4c7af5e9
@ -34,14 +34,15 @@ bool LedDeviceSK9822::init(const QJsonObject &deviceConfig)
|
|||||||
Info(_log, "[SK9822] Using global brightness control with threshold of %d and max level of %d", _globalBrightnessControlThreshold, _globalBrightnessControlMaxLevel);
|
Info(_log, "[SK9822] Using global brightness control with threshold of %d and max level of %d", _globalBrightnessControlThreshold, _globalBrightnessControlMaxLevel);
|
||||||
|
|
||||||
const unsigned int startFrameSize = 4;
|
const unsigned int startFrameSize = 4;
|
||||||
const unsigned int endFrameSize = qMax<unsigned int>(((_ledCount + 15) / 16), 4);
|
const unsigned int endFrameSize = ((_ledCount/32) + 1)*4;
|
||||||
const unsigned int bufferSize = (_ledCount * 4) + startFrameSize + endFrameSize;
|
const unsigned int bufferSize = (_ledCount * 4) + startFrameSize + endFrameSize;
|
||||||
|
|
||||||
_ledBuffer.resize(bufferSize, 0xFF);
|
_ledBuffer.resize(0, 0x00);
|
||||||
_ledBuffer[0] = 0x00;
|
_ledBuffer.resize(bufferSize, 0x00);
|
||||||
_ledBuffer[1] = 0x00;
|
//_ledBuffer[0] = 0x00;
|
||||||
_ledBuffer[2] = 0x00;
|
//_ledBuffer[1] = 0x00;
|
||||||
_ledBuffer[3] = 0x00;
|
//_ledBuffer[2] = 0x00;
|
||||||
|
//_ledBuffer[3] = 0x00;
|
||||||
|
|
||||||
isInitOK = true;
|
isInitOK = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user