mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
AtmoOrb Fix (#988)
* AtmoOrb UdpSocket-Bind Fix * Cleanup and update defaults (to work via PowerLan) * Cleanup and update defaults (to work via PowerLan) * AtmoOrb identification support, small updates * AtmoOrb discovery & identification support, fixes and stability updates * Small clean-ups * Type fix * Add missing include * Adalight - Update default config and levels * Update Atmoorb sketch * Yeelight - Update default value
This commit is contained in:
@@ -11,13 +11,10 @@
|
||||
|
||||
class QUdpSocket;
|
||||
|
||||
/**
|
||||
* Implementation for the AtmoOrb
|
||||
*
|
||||
* To use set the device to "atmoorb".
|
||||
*
|
||||
* @author RickDB (github)
|
||||
*/
|
||||
///
|
||||
/// Implementation of the LedDevice interface for sending to
|
||||
/// AtmoOrb devices via network
|
||||
///
|
||||
class LedDeviceAtmoOrb : public LedDevice
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -43,6 +40,27 @@ public:
|
||||
///
|
||||
static LedDevice* construct(const QJsonObject &deviceConfig);
|
||||
|
||||
///
|
||||
/// @brief Discover AtmoOrb devices available (for configuration).
|
||||
///
|
||||
/// @return A JSON structure holding a list of devices found
|
||||
///
|
||||
virtual QJsonObject discover() override;
|
||||
|
||||
///
|
||||
/// @brief Send an update to the AtmoOrb device to identify it.
|
||||
///
|
||||
/// Following parameters are required
|
||||
/// @code
|
||||
/// {
|
||||
/// "orbId" : "orb identifier in the range of (1-255)",
|
||||
/// }
|
||||
///@endcode
|
||||
///
|
||||
/// @param[in] params Parameters to address device
|
||||
///
|
||||
virtual void identify(const QJsonObject& params) override;
|
||||
|
||||
protected:
|
||||
|
||||
///
|
||||
@@ -111,15 +129,9 @@ private:
|
||||
/// use Orbs own (external) smoothing algorithm
|
||||
bool _useOrbSmoothing;
|
||||
|
||||
/// Transition time between colors (not implemented)
|
||||
int _transitiontime;
|
||||
|
||||
// Maximum allowed color difference, will skip Orb (external) smoothing once reached
|
||||
int _skipSmoothingDiff;
|
||||
|
||||
/// Number of leds in Orb, used to determine buffer size
|
||||
int _numLeds;
|
||||
|
||||
/// Array of the orb ids.
|
||||
QVector<int> _orbIds;
|
||||
|
||||
@@ -127,6 +139,8 @@ private:
|
||||
QMap<int, int> lastColorRedMap;
|
||||
QMap<int, int> lastColorGreenMap;
|
||||
QMap<int, int> lastColorBlueMap;
|
||||
|
||||
QMultiMap<int, QHostAddress> _services;
|
||||
};
|
||||
|
||||
#endif // LEDEVICEATMOORB_H
|
||||
|
Reference in New Issue
Block a user