From 25a79d6279e6aa025e1e58ec409a44dbf3552a96 Mon Sep 17 00:00:00 2001 From: penfold42 Date: Mon, 20 Jun 2016 17:10:23 +1000 Subject: [PATCH] hyperiond doesnt call switchoff to the leds on exit (#19) * Fixed compile error when no grabbers are defined * Remove stupid avahi warning... * Started on the new integrated UDP listener to replace the python effect. Cloned boblight server and rename it to be UDP listener It compiles!, It starts! it seems to work as a second boblight protocol server... * moving from the exsting TCP to UDP. i can catch packets now.. need to consider ditching the connection handling * It kinda works right now. UDP packets are received, led data is sent and hyperion displays them. .... for a moment before going back to what it was doing * It works! looks like the default priority of 900 was fighting with something else that was also 900 commented out some udp packet debugging * oops, forgot to add the changes the the previous commit * resolving merge conflicts * The refactoring lost the automatic switchoff of leds. Now we track the hyperion object and delete it on exit (which cleans up the led strip) --- src/hyperiond/hyperiond.cpp | 4 +++- src/hyperiond/hyperiond.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hyperiond/hyperiond.cpp b/src/hyperiond/hyperiond.cpp index 0b32e718..8771bdfd 100644 --- a/src/hyperiond/hyperiond.cpp +++ b/src/hyperiond/hyperiond.cpp @@ -36,9 +36,10 @@ HyperionDaemon::HyperionDaemon(std::string configFile, QObject *parent) , _fbGrabber(nullptr) , _osxGrabber(nullptr) , _webConfig(nullptr) + , _hyperion(nullptr) { loadConfig(configFile); - Hyperion::initInstance(_config, configFile); + _hyperion = Hyperion::initInstance(_config, configFile); Info(_log, "Hyperion started and initialised"); } @@ -55,6 +56,7 @@ HyperionDaemon::~HyperionDaemon() delete _boblightServer; delete _udpListener; delete _webConfig; + delete _hyperion; } diff --git a/src/hyperiond/hyperiond.h b/src/hyperiond/hyperiond.h index 8ed6899c..e05454d6 100644 --- a/src/hyperiond/hyperiond.h +++ b/src/hyperiond/hyperiond.h @@ -75,4 +75,5 @@ private: FramebufferWrapper* _fbGrabber; OsxWrapper* _osxGrabber; WebConfig* _webConfig; + Hyperion* _hyperion; };