mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
add limit for write to leddevice (#432)
* add limit for write to leddevice * add to default config * add i18n * extend xmas effect * fix indention * add check for minimum brightness * adapt effects to fading and new minWriteTime * remove old latchTime rename minimumWriteTime to latchTime make it as dev specific option * set default for rewriteTime to 1s pause smoothing on color too * reenable smoothing for color - it looks nicer :-) * fix timeout timer
This commit is contained in:
@@ -62,6 +62,7 @@ public:
|
||||
|
||||
void setEnable(bool enable);
|
||||
bool enabled() { return _enabled; };
|
||||
int getLatchTime() { return _latchTime_ms; };
|
||||
|
||||
inline bool componentState() { return enabled(); };
|
||||
|
||||
@@ -93,15 +94,16 @@ 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;
|
||||
|
||||
qint64 _last_write_time;
|
||||
unsigned int _latchTime_ms;
|
||||
protected slots:
|
||||
/// Write the last data to the leds again
|
||||
int rewriteLeds();
|
||||
|
||||
private:
|
||||
std::vector<ColorRgb> _ledValues;
|
||||
bool _componentRegistered;
|
||||
bool _enabled;
|
||||
bool _componentRegistered;
|
||||
bool _enabled;
|
||||
};
|
||||
|
Reference in New Issue
Block a user