Commit 079a3bbe authored by golgoj4's avatar golgoj4

refs #1767 - going backwards to go forwards. I promise.

parent d7e5143c
......@@ -40,8 +40,8 @@ SOURCES += ../Main.cpp \
../../DCE/DeviceData_Impl.cpp \
../../PlutoUtils/getch.cpp \
../../Gen_Devices/Hue_ControllerBase.cpp \
../Hue_Controller.cpp \
huebridge.cpp
../Hue_Controller.cpp
HEADERS += ../../PlutoUtils/ThreadedClass.h \
../../PlutoUtils/MultiThreadIncludes.h \
../../PlutoUtils/StringUtils.h \
......@@ -63,5 +63,4 @@ HEADERS += ../../PlutoUtils/ThreadedClass.h \
../../pluto_main/Define_DeviceCategory.h \
../../pluto_main/Define_DeviceTemplate.h \
../../Gen_Devices/Hue_ControllerBase.h \
../Hue_Controller.h \
huebridge.h
../Hue_Controller.h
#############################################################################
# Makefile for building: HueController
# Generated by qmake (2.01a) (Qt 4.6.2) on: Sun May 5 07:29:36 2013
# Generated by qmake (2.01a) (Qt 4.6.2) on: Sun May 5 11:03:52 2013
# Project: HueController.pro
# Template: app
# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile HueController.pro
......
#include "huebridge.h"
HueBridge::HueBridge(QObject *parent) :
QObject(parent)
HueBridge::HueBridge(Hue_Controller* dceObject, QObject *parent) :
QObject(parent), mp_dceController(dceObject)
{
}
......@@ -3,16 +3,25 @@
#include <QObject>
#include "qjson/parser.h"
#include "qjson/qobjecthelper.h"
#include "qjson/serializer.h"
#include "qnetworkaccessmanager.h"
#include "Hue_Controller/Hue_Controller.h"
class HueBridge : public QObject
{
Q_OBJECT
public:
explicit HueBridge(QObject *parent = 0);
explicit HueBridge(DCE::Hue_Controller* dceObject, QObject *parent = 0 );
signals:
public slots:
private:
DCE::Hue_Controller *mp_dceController;
};
#endif // HUEBRIDGE_H
......@@ -43,15 +43,15 @@ Hue_Controller::Hue_Controller(int DeviceID, string ServerAddress,bool bConnectE
Hue_Controller::Hue_Controller(Command_Impl *pPrimaryDeviceCommand, DeviceData_Impl *pData, Event_Impl *pEvent, Router *pRouter)
: Hue_Controller_Command(pPrimaryDeviceCommand, pData, pEvent, pRouter)
//<-dceag-const2-e->
//{
//}
{
}
//<-dceag-dest-b->
Hue_Controller::~Hue_Controller()
//<-dceag-dest-e->
//{
//
//}
{
}
//<-dceag-getconfig-b->
......@@ -66,7 +66,7 @@ bool Hue_Controller::GetConfig()
QString m_id= QString::fromStdString(this->DATA_Get_Device());
if(m_id.isEmpty()){
qDebug() << "Hue ID is not set, Adding 1st missing hue controller." << m_id;
findLocalControllers();
// DATA_Set_Device("derp", true);
// DATA_Set_Server_IP("foodiddy", true);
......@@ -350,8 +350,6 @@ void Hue_Controller::CMD_Set_Color_RGB(int iRed_Level,int iGreen_Level,int iBlue
cout << "Parm #281 - Blue_Level=" << iBlue_Level << endl;
}
bool Hue_Controller::findLocalControllers(){
}
......@@ -19,11 +19,9 @@
#include "Gen_Devices/Hue_ControllerBase.h"
//<-dceag-d-e->
#include "QObject"
#include "qjson/parser.h"
#include "qjson/qobjecthelper.h"
#include "qjson/serializer.h"
#include "qnetworkaccessmanager.h"
//<-dceag-decl-b->
namespace DCE
{
......@@ -33,10 +31,7 @@ namespace DCE
// Private member variables
bool mb_isNew;
// Private methods
public:
// Public member variables
......@@ -169,8 +164,7 @@ NOEMON or CANBUS */
//<-dceag-h-e->
public slots:
void replyFinished(QNetworkReply*);
};
//<-dceag-end-b->
......
......@@ -13,6 +13,7 @@
*/
//<-dceag-incl-b->
#include "Hue_Controller.h"
#include "DCE/Logger.h"
#include "ServerLogger.h"
#include "PlutoUtils/FileUtils.h"
......@@ -118,7 +119,7 @@ int main(int argc, char* argv[])
<< "Visit www.plutohome.com for source code and license information" << endl << endl;
string sRouter_IP="dcerouter";
int PK_Device=0;
int PK_Device=69;
string sLogger="stdout";
bool bLocalMode=false,bError=false; // An error parsing the command line
......@@ -205,6 +206,7 @@ int main(int argc, char* argv[])
g_pSocketCrashHandler=SocketCrashHandler;
LoggerWrapper::GetInstance()->Write(LV_STATUS, "Connect OK");
pHue_Controller->CreateChildren();
if( bLocalMode )
pHue_Controller->RunLocalMode();
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment