mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Correctly set buffer size based on number of leds so that it works with non-standard AtmoOrb setups.
Former-commit-id: 6aec2410d6e870c8489e565269f2990e3a9e1b85
This commit is contained in:
parent
bd1a45216a
commit
0d8c4ac5fb
@ -88,7 +88,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 + 24 * 3);
|
||||
bytes.resize(5 + numLeds * 3);
|
||||
|
||||
// Command identifier: C0FFEE
|
||||
bytes[0] = 0xC0;
|
||||
@ -121,7 +121,7 @@ int LedDeviceAtmoOrb::switchOff() {
|
||||
for (int i = 0; i < orbIds.size(); i++) {
|
||||
|
||||
QByteArray bytes;
|
||||
bytes.resize(5 + 24 * 3);
|
||||
bytes.resize(5 + numLeds * 3);
|
||||
|
||||
// Command identifier: C0FFEE
|
||||
bytes[0] = 0xC0;
|
||||
|
Loading…
Reference in New Issue
Block a user