mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Fix "Timers cannot be stopped from another thread" during shutdown (#876)
This commit is contained in:
parent
c85b4c530c
commit
45303e1b64
@ -63,7 +63,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @param ledCount The number of leds
|
/// @param ledCount The number of leds
|
||||||
///
|
///
|
||||||
PriorityMuxer(int ledCount);
|
PriorityMuxer(int ledCount, QObject * parent);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Destructor
|
/// Destructor
|
||||||
|
@ -46,7 +46,7 @@ Hyperion::Hyperion(const quint8& instance)
|
|||||||
, _componentRegister(this)
|
, _componentRegister(this)
|
||||||
, _ledString(hyperion::createLedString(getSetting(settings::LEDS).array(), hyperion::createColorOrder(getSetting(settings::DEVICE).object())))
|
, _ledString(hyperion::createLedString(getSetting(settings::LEDS).array(), hyperion::createColorOrder(getSetting(settings::DEVICE).object())))
|
||||||
, _imageProcessor(new ImageProcessor(_ledString, this))
|
, _imageProcessor(new ImageProcessor(_ledString, this))
|
||||||
, _muxer(_ledString.leds().size())
|
, _muxer(_ledString.leds().size(), this)
|
||||||
, _raw2ledAdjustment(hyperion::createLedColorsAdjustment(_ledString.leds().size(), getSetting(settings::COLOR).object()))
|
, _raw2ledAdjustment(hyperion::createLedColorsAdjustment(_ledString.leds().size(), getSetting(settings::COLOR).object()))
|
||||||
, _effectEngine(nullptr)
|
, _effectEngine(nullptr)
|
||||||
, _messageForwarder(nullptr)
|
, _messageForwarder(nullptr)
|
||||||
|
@ -74,7 +74,7 @@ bool HyperionIManager::startInstance(const quint8& inst, const bool& block)
|
|||||||
if(!_runningInstances.contains(inst) && !_startQueue.contains(inst))
|
if(!_runningInstances.contains(inst) && !_startQueue.contains(inst))
|
||||||
{
|
{
|
||||||
QThread* hyperionThread = new QThread();
|
QThread* hyperionThread = new QThread();
|
||||||
hyperionThread->setObjectName("HyperionIManagerThread");
|
hyperionThread->setObjectName("HyperionThread");
|
||||||
Hyperion* hyperion = new Hyperion(inst);
|
Hyperion* hyperion = new Hyperion(inst);
|
||||||
hyperion->moveToThread(hyperionThread);
|
hyperion->moveToThread(hyperionThread);
|
||||||
// setup thread management
|
// setup thread management
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
const int PriorityMuxer::LOWEST_PRIORITY = std::numeric_limits<uint8_t>::max();
|
const int PriorityMuxer::LOWEST_PRIORITY = std::numeric_limits<uint8_t>::max();
|
||||||
|
|
||||||
PriorityMuxer::PriorityMuxer(int ledCount)
|
PriorityMuxer::PriorityMuxer(int ledCount, QObject * parent)
|
||||||
: QObject()
|
: QObject(parent)
|
||||||
, _log(Logger::getInstance("HYPERION"))
|
, _log(Logger::getInstance("HYPERION"))
|
||||||
, _currentPriority(PriorityMuxer::LOWEST_PRIORITY)
|
, _currentPriority(PriorityMuxer::LOWEST_PRIORITY)
|
||||||
, _manualSelectedPriority(256)
|
, _manualSelectedPriority(256)
|
||||||
|
Loading…
Reference in New Issue
Block a user