mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge branch 'master' into refactor/led_device
This commit is contained in:
@@ -127,7 +127,7 @@ int LedDeviceWS281x::write(const std::vector<ColorRgb> &ledValues)
|
||||
Rgb_to_Rgbw(color, &_temp_rgbw, _whiteAlgorithm);
|
||||
}
|
||||
|
||||
_led_string.channel[_channel].leds[idx++] =
|
||||
_led_string.channel[_channel].leds[idx++] =
|
||||
((uint32_t)_temp_rgbw.white << 24) + ((uint32_t)_temp_rgbw.red << 16) + ((uint32_t)_temp_rgbw.green << 8) + _temp_rgbw.blue;
|
||||
|
||||
}
|
||||
@@ -135,6 +135,6 @@ int LedDeviceWS281x::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
_led_string.channel[_channel].leds[idx++] = 0;
|
||||
}
|
||||
|
||||
|
||||
return ws2811_render(&_led_string) ? -1 : 0;
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ public:
|
||||
///
|
||||
/// @brief Destructor of the LedDevice
|
||||
///
|
||||
virtual ~LedDeviceWS281x() override;
|
||||
~LedDeviceWS281x() override;
|
||||
|
||||
///
|
||||
/// @brief Destructor of the LedDevice
|
||||
@@ -37,21 +37,21 @@ protected:
|
||||
/// @param[in] deviceConfig the JSON device configuration
|
||||
/// @return True, if success
|
||||
///
|
||||
virtual bool init(const QJsonObject &deviceConfig) override;
|
||||
bool init(const QJsonObject &deviceConfig) override;
|
||||
|
||||
///
|
||||
/// @brief Opens the output device.
|
||||
///
|
||||
/// @return Zero on success (i.e. device is ready), else negative
|
||||
///
|
||||
virtual int open() override;
|
||||
int open() override;
|
||||
|
||||
///
|
||||
/// @brief Closes the output device.
|
||||
///
|
||||
/// @return Zero on success (i.e. device is closed), else negative
|
||||
///
|
||||
virtual int close() override;
|
||||
int close() override;
|
||||
|
||||
///
|
||||
/// @brief Writes the RGB-Color values to the LEDs.
|
||||
@@ -59,7 +59,7 @@ protected:
|
||||
/// @param[in] ledValues The RGB-color per LED
|
||||
/// @return Zero on success, else negative
|
||||
///
|
||||
virtual int write(const std::vector<ColorRgb> & ledValues) override;
|
||||
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||
|
||||
private:
|
||||
|
||||
|
Reference in New Issue
Block a user