i18n corrected

libqt5sql5-sqlite appended to the dependency list
lgtm alerts fixed
added message forwarder to global settings
subscribe type leds-update appended (thanks @Brindosch)
Boblight server port check instead of error message
Race Condition of different priorities are prevented at startup

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
Paulchen-Panther
2019-07-20 11:28:16 +02:00
parent 3a488e703c
commit af416ba5fc
18 changed files with 72 additions and 829 deletions

View File

@@ -50,7 +50,7 @@ Hyperion::Hyperion(const quint8& instance)
, _muxer(_ledString.leds().size())
, _raw2ledAdjustment(hyperion::createLedColorsAdjustment(_ledString.leds().size(), getSetting(settings::COLOR).object()))
, _effectEngine(nullptr)
// , _messageForwarder(new MessageForwarder(this))
, _messageForwarder(nullptr)
, _log(Logger::getInstance("HYPERION"))
, _hwLedCount()
, _ledGridSize(hyperion::getLedLayoutGridSize(getSetting(settings::LEDS).array()))
@@ -116,6 +116,10 @@ void Hyperion::start()
_deviceSmooth = new LinearColorSmoothing(getSetting(settings::SMOOTHING), this);
connect(this, &Hyperion::settingsChanged, _deviceSmooth, &LinearColorSmoothing::handleSettingsUpdate);
// create the message forwarder only on main instance
if (_instIndex == 0)
_messageForwarder = new MessageForwarder(this);
// create the effect engine; needs to be initialized after smoothing!
_effectEngine = new EffectEngine(this);
connect(_effectEngine, &EffectEngine::effectListUpdated, this, &Hyperion::effectListUpdated);
@@ -162,7 +166,7 @@ void Hyperion::freeObjects(bool emitCloseSignal)
delete _captureCont;
delete _effectEngine;
delete _raw2ledAdjustment;
// delete _messageForwarder;
delete _messageForwarder;
delete _settingsManager;
delete _ledDeviceWrapper;
}

View File

@@ -57,7 +57,7 @@ void HyperionIManager::stopAll()
}
}
const bool HyperionIManager::startInstance(const quint8& inst, const bool& block)
bool HyperionIManager::startInstance(const quint8& inst, const bool& block)
{
if(_instanceTable->instanceExist(inst))
{
@@ -102,7 +102,7 @@ const bool HyperionIManager::startInstance(const quint8& inst, const bool& block
return false;
}
const bool HyperionIManager::stopInstance(const quint8& inst, const bool& block)
bool HyperionIManager::stopInstance(const quint8& inst, const bool& block)
{
// inst 0 can't be stopped
if(!isInstAllowed(inst))
@@ -133,7 +133,7 @@ const bool HyperionIManager::stopInstance(const quint8& inst, const bool& block)
return false;
}
const bool HyperionIManager::createInstance(const QString& name, const bool& start)
bool HyperionIManager::createInstance(const QString& name, const bool& start)
{
quint8 inst;
if(_instanceTable->createInstance(name, inst))
@@ -149,7 +149,7 @@ const bool HyperionIManager::createInstance(const QString& name, const bool& sta
return false;
}
const bool HyperionIManager::deleteInstance(const quint8& inst)
bool HyperionIManager::deleteInstance(const quint8& inst)
{
// inst 0 can't be deleted
if(!isInstAllowed(inst))
@@ -169,7 +169,7 @@ const bool HyperionIManager::deleteInstance(const quint8& inst)
return false;
}
const bool HyperionIManager::saveName(const quint8& inst, const QString& name)
bool HyperionIManager::saveName(const quint8& inst, const QString& name)
{
if(_instanceTable->saveName(inst, name))
{

View File

@@ -48,7 +48,6 @@ PriorityMuxer::PriorityMuxer(int ledCount)
connect(_updateTimer, &QTimer::timeout, this, &PriorityMuxer::setCurrentTime);
_updateTimer->setInterval(250);
_updateTimer->start();
InputInfo ninfo;
}
PriorityMuxer::~PriorityMuxer()
@@ -279,7 +278,9 @@ void PriorityMuxer::clearAll(bool forceClearAll)
void PriorityMuxer::setCurrentTime(void)
{
const int64_t now = QDateTime::currentMSecsSinceEpoch();
int newPriority = PriorityMuxer::LOWEST_PRIORITY;
int newPriority;
_activeInputs.contains(140) ? newPriority = 140 : newPriority = PriorityMuxer::LOWEST_PRIORITY;
_activeInputs.contains(0) ? newPriority = 0 : newPriority = PriorityMuxer::LOWEST_PRIORITY;
for (auto infoIt = _activeInputs.begin(); infoIt != _activeInputs.end();)
{