mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Expand effect engine & ui update (#445)
* update
* update
* update
* .
* .
* .
* update
* .
* .
* .
* .
* update
* .
* update
* .
* update
* update
* update
* update
* update
* update
* .
* update
* update
* update
* .
* .
* .
* Revert "."
This reverts commit 4dd6404b32
.
* update
* .
* .
* .
* .
* .
* .
* .
* .
* .
* .
* .
* ...
* .
* .
* .
* .
* .
* .
* .
* .
* .
* update
* update
* update
* remove svg and pic
* colorpicker imgs to base64 to prevent delayed load if not cached
* fix json2python func
* update swirl with rgba
* add double swirl, tune default val in schema, update explanation
* adjust swirl.py
* FileObserver for config checks with timer as fallback (#4)
This commit is contained in:
@@ -445,10 +445,18 @@ Hyperion::Hyperion(const QJsonObject &qjsonConfig, const QString configFile)
|
||||
Debug(_log,"configured leds: %d hw leds: %d", getLedCount(), _hwLedCount);
|
||||
WarningIf(hwLedCount < getLedCount(), _log, "more leds configured than available. check 'ledCount' in 'device' section");
|
||||
|
||||
// setup interval timer for config state checks and initial shot
|
||||
// setup config state checks and initial shot
|
||||
checkConfigState();
|
||||
QObject::connect(&_cTimer, SIGNAL(timeout()), this, SLOT(checkConfigState()));
|
||||
_cTimer.start(2000);
|
||||
if(_fsWatcher.addPath(_configFile))
|
||||
{
|
||||
QObject::connect(&_fsWatcher, &QFileSystemWatcher::fileChanged, this, &Hyperion::checkConfigState);
|
||||
}
|
||||
else
|
||||
{
|
||||
Warning(_log,"Filesystem Observer failed for file: %s, use fallback timer", _configFile.toStdString().c_str());
|
||||
QObject::connect(&_cTimer, SIGNAL(timeout()), this, SLOT(checkConfigState()));
|
||||
_cTimer.start(2000);
|
||||
}
|
||||
|
||||
// pipe muxer signal for effect/color timerunner to hyperionStateChanged slot
|
||||
QObject::connect(&_muxer, &PriorityMuxer::timerunner, this, &Hyperion::hyperionStateChanged);
|
||||
@@ -545,7 +553,7 @@ Hyperion::BonjourRegister Hyperion::getHyperionSessions()
|
||||
return _hyperionSessions;
|
||||
}
|
||||
|
||||
void Hyperion::checkConfigState()
|
||||
void Hyperion::checkConfigState(QString cfile)
|
||||
{
|
||||
// Check config modifications
|
||||
QFile f(_configFile);
|
||||
|
Reference in New Issue
Block a user