Leddevice refactoring the next next part (#263)

* switch rs232 provider to completly async transfer

* start of implementing a seperate init function for leddevices

* rename setconfig to init

* more fixes

* implement missing code

* fix code style

* remove debug  code

* remove  debug stuff

* set loglevel to original state
This commit is contained in:
redPanther
2016-10-08 08:14:36 +02:00
committed by GitHub
parent afed2e68e0
commit 5aac2be702
72 changed files with 542 additions and 452 deletions

View File

@@ -164,7 +164,7 @@ CiColor PhilipsHueLight::rgbToCiColor(float red, float green, float blue)
LedDevicePhilipsHue::LedDevicePhilipsHue(const Json::Value &deviceConfig)
: LedDevice()
{
setConfig(deviceConfig);
_deviceReady = init(deviceConfig);
manager = new QNetworkAccessManager();
timer.setInterval(3000);
@@ -177,7 +177,7 @@ LedDevicePhilipsHue::~LedDevicePhilipsHue()
delete manager;
}
bool LedDevicePhilipsHue::setConfig(const Json::Value &deviceConfig)
bool LedDevicePhilipsHue::init(const Json::Value &deviceConfig)
{
host = deviceConfig["output"].asString().c_str();
username = deviceConfig.get("username", "newdeveloper").asString().c_str();