mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Make sure the byte array is empty before filling it.
Former-commit-id: 64f76fa358234e131377ecfabf196f3c7324e79f
This commit is contained in:
parent
5be072be24
commit
dcc6a9b449
@ -77,6 +77,7 @@ int LedDeviceAtmoOrb::write(const std::vector<ColorRgb> & ledValues) {
|
||||
void LedDeviceAtmoOrb::setColor(unsigned int orbId, const ColorRgb& color, int commandType) {
|
||||
QByteArray bytes;
|
||||
bytes.resize(5 + numLeds * 3);
|
||||
bytes.fill('\0');
|
||||
|
||||
// Command identifier: C0FFEE
|
||||
bytes[0] = 0xC0;
|
||||
@ -107,6 +108,7 @@ int LedDeviceAtmoOrb::switchOff() {
|
||||
for (unsigned int i = 0; i < orbIds.size(); i++) {
|
||||
QByteArray bytes;
|
||||
bytes.resize(5 + numLeds * 3);
|
||||
bytes.fill('\0');
|
||||
|
||||
// Command identifier: C0FFEE
|
||||
bytes[0] = 0xC0;
|
||||
|
Loading…
Reference in New Issue
Block a user