rework bootsequence (#30)

* udplistener/boblight: use hyperion::getInstance
hyperiond: fix dispmanx is started twice
hyperiond: rework bootsequence - now named as InitalEffect

* pull out webconfig from hyperiondaemon to functional when daemon crashes
initialEffect: forbid foreground effect duration infinitiy
This commit is contained in:
redPanther
2016-06-20 23:41:07 +02:00
committed by brindosch
parent 3dab2ec405
commit eccd4e6637
7 changed files with 82 additions and 62 deletions

View File

@@ -11,8 +11,7 @@
#include <getoptPlusPlus/getoptpp.h>
#include <utils/Logger.h>
#include <webconfig/WebConfig.h>
#include "hyperiond.h"
@@ -109,13 +108,24 @@ int main(int argc, char** argv)
return 1;
}
HyperionDaemon* hyperiond = new HyperionDaemon(configFiles[argvId], &app);
hyperiond->run();
HyperionDaemon* hyperiond = nullptr;
try
{
hyperiond = new HyperionDaemon(configFiles[argvId], &app);
hyperiond->run();
}
catch (...)
{
Error(log, "Hyperion Daemon aborted");
}
WebConfig* webConfig = new WebConfig(&app);
// run the application
int rc = app.exec();
Info(log, "INFO: Application closed with code %d", rc);
delete webConfig;
delete hyperiond;
return rc;