Skip to content

Commit

Permalink
Close LED device on correct Thread (#803)
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Mar 23, 2024
1 parent eaf76af commit 52f12b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sources/leddevice/LedDeviceWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void LedDeviceWrapper::createLedDevice(QJsonObject config, int smoothingInterval
_ledDevice = std::unique_ptr<LedDevice, void(*)(LedDevice*)>(
LedDeviceFactory::construct(config),
[](LedDevice* oldLed) {
oldLed->stop();
QUEUE_CALL_0(oldLed, stop);
hyperhdr::THREAD_REMOVER(QString("LedDevice"), oldLed->thread(), oldLed);
}
);
Expand Down
2 changes: 1 addition & 1 deletion sources/leddevice/dev_rpi_pwm/LedDeviceWS281x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ bool LedDeviceWS281x::init(const QJsonObject& deviceConfig)
Debug(_log, "ws281x strip type : %d", _ledString->channel[_channel].strip_type);

if (_defaultInterval > 0)
Error(_log, "The refresh timer is enabled ('Refresh time' > 0) and may limit the performance of the LED driver. Ignore this error if you set it on purpose for some reason (but you almost never need it).");
Warning(_log, "The refresh timer is enabled ('Refresh time' > 0) and may limit the performance of the LED driver. Ignore this error if you set it on purpose for some reason (but you almost never need it).");

isInitOK = true;
}
Expand Down
2 changes: 1 addition & 1 deletion sources/leddevice/dev_serial/ProviderSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bool ProviderSerial::init(const QJsonObject& deviceConfig)
Debug(_log, "Retry limit : %d", _maxRetry);

if (_defaultInterval > 0)
Error(_log, "The refresh timer is enabled ('Refresh time' > 0) and may limit the performance of the LED driver. Ignore this error if you set it on purpose for some reason (but you almost never need it).");
Warning(_log, "The refresh timer is enabled ('Refresh time' > 0) and may limit the performance of the LED driver. Ignore this error if you set it on purpose for some reason (but you almost never need it).");

isInitOK = true;
}
Expand Down
2 changes: 1 addition & 1 deletion sources/leddevice/dev_spi/ProviderSpi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool ProviderSpi::init(const QJsonObject& deviceConfig)
Debug(_log, "Inverted: %s, Mode: %d", (_spiDataInvert) ? "yes" : "no", _spiMode);

if (_defaultInterval > 0)
Error(_log, "The refresh timer is enabled ('Refresh time' > 0) and may limit the performance of the LED driver. Ignore this error if you set it on purpose for some reason (but you almost never need it).");
Warning(_log, "The refresh timer is enabled ('Refresh time' > 0) and may limit the performance of the LED driver. Ignore this error if you set it on purpose for some reason (but you almost never need it).");

isInitOK = true;
}
Expand Down

0 comments on commit 52f12b4

Please sign in to comment.