mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Stop LedDevice:write for disabled devices + Nanoleaf Fixes (#629)
* Handle Exceptions in main & Pythoninit * Have SSDPDiscover generic again * Have SSDPDiscover generic again * Change Info- to Debug logs as technical service messages * Nanoleaf - When switched on, ensure UDP mode * Include SQL Database in Cross-Compile instructions * Fix Clazy (QT code checker) and clang Warnings * Stop LedDevice:write for disabled device * Nanoleaf: Fix uint printfs * NanoLeaf: Fix indents to tabs * NanoLeaf - Add debug verbosity switches * Device switchability support, FileDevice with timestamp support * Nanoleaf Light Panels now support External Control V2 * Enhance LedDeviceFile by Timestamp + fix readyness * Stop color stream, if LedDevice disabled * Nanoleaf - remove switchability
This commit is contained in:
committed by
Paulchen Panther
parent
f917f0fceb
commit
ce7c99d2cd
@@ -51,8 +51,18 @@ public:
|
||||
///
|
||||
const QString & getColorOrder() { return _colorOrder; };
|
||||
|
||||
void setActiveDevice(QString dev);
|
||||
const QString & getActiveDevice() { return _activeDevice; };
|
||||
///
|
||||
/// @brief Set the current active ledDevice type
|
||||
///
|
||||
/// @param deviceType Device's type
|
||||
///
|
||||
void setActiveDeviceType(QString deviceType);
|
||||
|
||||
///
|
||||
/// @brief Get the current active ledDevice type
|
||||
///
|
||||
const QString & getActiveDeviceType() { return _activeDeviceType; };
|
||||
|
||||
void setLedCount(int ledCount);
|
||||
int getLedCount() { return _ledCount; }
|
||||
|
||||
@@ -66,7 +76,7 @@ public slots:
|
||||
///
|
||||
/// Is called on thread start, all construction tasks and init should run here
|
||||
///
|
||||
virtual void start() { _deviceReady = open(); };
|
||||
virtual void start() { _deviceReady = (open() == 0 ? true : false);}
|
||||
|
||||
///
|
||||
/// Writes the RGB-Color values to the leds.
|
||||
@@ -102,6 +112,14 @@ protected:
|
||||
///
|
||||
virtual int open();
|
||||
|
||||
///
|
||||
/// Writes "BLACK" to the output stream
|
||||
///
|
||||
/// @return Zero on success else negative
|
||||
///
|
||||
virtual int writeBlack();
|
||||
|
||||
|
||||
// Helper to pipe device config from constructor to start()
|
||||
QJsonObject _devConfig;
|
||||
|
||||
@@ -113,7 +131,7 @@ protected:
|
||||
|
||||
bool _deviceReady;
|
||||
|
||||
QString _activeDevice;
|
||||
QString _activeDeviceType;
|
||||
|
||||
int _ledCount;
|
||||
int _ledRGBCount;
|
||||
|
@@ -50,9 +50,9 @@ public:
|
||||
int getLatchTime();
|
||||
|
||||
///
|
||||
/// @brief Get the current active ledDevice
|
||||
/// @brief Get the current active ledDevice type
|
||||
///
|
||||
const QString & getActiveDevice();
|
||||
const QString & getActiveDeviceType();
|
||||
|
||||
///
|
||||
/// @brief Return the last enable state
|
||||
|
Reference in New Issue
Block a user