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

@@ -68,6 +68,7 @@ protected:
/// @return Zero on success else negative
///
virtual int write(const std::vector<ColorRgb>& ledValues) = 0;
virtual bool init(const QJsonObject &deviceConfig);
/// The common Logger instance for all LedDevices
Logger * _log;
@@ -86,8 +87,9 @@ protected:
/// Timer object which makes sure that led data is written at a minimum rate
/// e.g. Adalight device will switch off when it does not receive data at least every 15 seconds
QTimer _refresh_timer;
QTimer _refresh_timer;
unsigned int _refresh_timer_interval;
protected slots:
/// Write the last data to the leds again
int rewriteLeds();