mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Philiphs Hue Improvments (#472)
* patch and improve philiphshue * cleanup * cleanup * cleanup * LedDevice switchOn() * add signal for on/off to ledDevice
This commit is contained in:
@@ -40,11 +40,14 @@ public:
|
||||
///
|
||||
virtual ~LedDevice() {}
|
||||
|
||||
/// Switch the leds off
|
||||
/// Switch the leds off (led hardware disable)
|
||||
virtual int switchOff();
|
||||
|
||||
|
||||
/// Switch the leds on (led hardware enable), used if reinitialization is required for the device implementation
|
||||
virtual int switchOn();
|
||||
|
||||
virtual int setLedValues(const std::vector<ColorRgb>& ledValues);
|
||||
|
||||
|
||||
///
|
||||
/// Opens and configures the output device
|
||||
///
|
||||
@@ -59,13 +62,20 @@ public:
|
||||
static QJsonObject getLedDeviceSchemas();
|
||||
static void setLedCount(int ledCount);
|
||||
static int getLedCount() { return _ledCount; }
|
||||
|
||||
|
||||
void setEnable(bool enable);
|
||||
bool enabled() { return _enabled; };
|
||||
int getLatchTime() { return _latchTime_ms; };
|
||||
|
||||
inline bool componentState() { return enabled(); };
|
||||
|
||||
|
||||
signals:
|
||||
///
|
||||
/// Emits whenever the led device switches between on/off
|
||||
/// @param newState The new state of the device
|
||||
///
|
||||
void enableStateChanged(bool newState);
|
||||
|
||||
protected:
|
||||
///
|
||||
/// Writes the RGB-Color values to the leds.
|
||||
|
Reference in New Issue
Block a user