mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* Cast fix * Fix #676
This commit is contained in:
@@ -11,6 +11,11 @@ LedDeviceWS281x::~LedDeviceWS281x()
|
||||
{
|
||||
}
|
||||
|
||||
LedDevice* LedDeviceWS281x::construct(const QJsonObject &deviceConfig)
|
||||
{
|
||||
return new LedDeviceWS281x(deviceConfig);
|
||||
}
|
||||
|
||||
bool LedDeviceWS281x::init(const QJsonObject &deviceConfig)
|
||||
{
|
||||
QString errortext;
|
||||
@@ -84,11 +89,6 @@ void LedDeviceWS281x::close()
|
||||
}
|
||||
}
|
||||
|
||||
LedDevice* LedDeviceWS281x::construct(const QJsonObject &deviceConfig)
|
||||
{
|
||||
return new LedDeviceWS281x(deviceConfig);
|
||||
}
|
||||
|
||||
// Send new values down the LED chain
|
||||
int LedDeviceWS281x::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
|
@@ -15,12 +15,12 @@ public:
|
||||
///
|
||||
/// @param deviceConfig json device config
|
||||
///
|
||||
LedDeviceWS281x(const QJsonObject &deviceConfig);
|
||||
explicit LedDeviceWS281x(const QJsonObject &deviceConfig);
|
||||
|
||||
///
|
||||
/// Destructor of the LedDevice, waits for DMA to complete and then cleans up
|
||||
///
|
||||
~LedDeviceWS281x() override;
|
||||
virtual ~LedDeviceWS281x() override;
|
||||
|
||||
/// constructs leddevice
|
||||
static LedDevice* construct(const QJsonObject &deviceConfig);
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
///
|
||||
/// @param deviceConfig the json device config
|
||||
/// @return true if success
|
||||
bool init(const QJsonObject &deviceConfig) override;
|
||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
||||
|
||||
public slots:
|
||||
///
|
||||
@@ -39,7 +39,7 @@ public slots:
|
||||
///
|
||||
virtual void close() override;
|
||||
|
||||
private:
|
||||
protected:
|
||||
///
|
||||
/// Writes the led color values to the led-device
|
||||
///
|
||||
@@ -48,6 +48,8 @@ private:
|
||||
///
|
||||
virtual int write(const std::vector<ColorRgb> &ledValues) override;
|
||||
|
||||
private:
|
||||
|
||||
ws2811_t _led_string;
|
||||
int _channel;
|
||||
RGBW::WhiteAlgorithm _whiteAlgorithm;
|
||||
|
Reference in New Issue
Block a user