implement hyperion restart via webui (#242)

* first try

* implement hyperion restart. core function is good, but needs a beeter structuring- something for next refactoring session ;-)

* several fixes (including osx)
merge with upstream
some refactoring

* add some eye candy to webui
This commit is contained in:
redPanther
2016-09-15 20:42:58 +02:00
committed by GitHub
parent a04f34eab7
commit eeb9b0f7da
33 changed files with 197 additions and 71 deletions

View File

@@ -657,24 +657,26 @@ unsigned Hyperion::getLedCount() const
bool Hyperion::configModified()
{
bool isModified = false;
QFile f(_configFile.c_str());
if (f.open(QFile::ReadOnly))
{
QCryptographicHash hash(QCryptographicHash::Sha1);
if (hash.addData(&f))
if (hash.addData(&f))
{
if (_configHash.size() == 0)
{
if (_configHash.size() == 0)
{
_configHash = hash.result();
qDebug(_configHash.toHex());
return false;
}
return _configHash != hash.result();
_configHash = hash.result();
}
else
{
isModified = _configHash != hash.result();
}
}
}
f.close();
return false;
return isModified;
}
void Hyperion::registerPriority(const std::string name, const int priority)

View File

@@ -1057,7 +1057,15 @@
{
"paths" :
{
"type" : "array"
"type" : "array",
"title" : "List of folders to additional effects",
"propertyOrder" : 1
},
"disable" :
{
"type" : "array",
"title" : "List of disabled effects",
"propertyOrder" : 2
}
},
"additionalProperties" : false