Skip to content

Commit 52f12b4

Browse files
committed
Close LED device on correct Thread (#803)
1 parent eaf76af commit 52f12b4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

sources/leddevice/LedDeviceWrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void LedDeviceWrapper::createLedDevice(QJsonObject config, int smoothingInterval
5656
_ledDevice = std::unique_ptr<LedDevice, void(*)(LedDevice*)>(
5757
LedDeviceFactory::construct(config),
5858
[](LedDevice* oldLed) {
59-
oldLed->stop();
59+
QUEUE_CALL_0(oldLed, stop);
6060
hyperhdr::THREAD_REMOVER(QString("LedDevice"), oldLed->thread(), oldLed);
6161
}
6262
);

sources/leddevice/dev_rpi_pwm/LedDeviceWS281x.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ bool LedDeviceWS281x::init(const QJsonObject& deviceConfig)
6969
Debug(_log, "ws281x strip type : %d", _ledString->channel[_channel].strip_type);
7070

7171
if (_defaultInterval > 0)
72-
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).");
72+
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).");
7373

7474
isInitOK = true;
7575
}

sources/leddevice/dev_serial/ProviderSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ bool ProviderSerial::init(const QJsonObject& deviceConfig)
7373
Debug(_log, "Retry limit : %d", _maxRetry);
7474

7575
if (_defaultInterval > 0)
76-
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).");
76+
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).");
7777

7878
isInitOK = true;
7979
}

sources/leddevice/dev_spi/ProviderSpi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bool ProviderSpi::init(const QJsonObject& deviceConfig)
5353
Debug(_log, "Inverted: %s, Mode: %d", (_spiDataInvert) ? "yes" : "no", _spiMode);
5454

5555
if (_defaultInterval > 0)
56-
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).");
56+
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).");
5757

5858
isInitOK = true;
5959
}

0 commit comments

Comments
 (0)