refresh time for all devices + schema fixes (#305)

* refresh for all :-)
remove dups

* - integrate refresh leds for all devices
- fix schemas for led devices

* add minimum for rewrite time

* rewriteTime: add missing info in config examples
This commit is contained in:
redPanther
2016-12-02 12:07:24 +01:00
committed by brindosch
parent 9ddbf81810
commit 96e8c29582
28 changed files with 109 additions and 68 deletions

View File

@@ -18,6 +18,7 @@ LedDevice::LedDevice()
, _ledBuffer(0)
, _deviceReady(true)
, _refresh_timer()
, _refresh_timer_interval(0)
{
LedDevice::getLedDeviceSchemas();
@@ -49,6 +50,12 @@ void LedDevice::setActiveDevice(std::string dev)
_activeDevice = dev;
}
bool LedDevice::init(const QJsonObject &deviceConfig)
{
_refresh_timer.setInterval( deviceConfig["rewriteTime"].toInt(_refresh_timer_interval) );
return true;
}
QJsonObject LedDevice::getLedDeviceSchemas()
{
// make sure the resources are loaded (they may be left out after static linking)