Merge branch 'master' into refactor/led_device

This commit is contained in:
Murat Seker
2020-08-23 21:02:25 +02:00
committed by GitHub
272 changed files with 1711 additions and 1738 deletions

View File

@@ -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;
}

View File

@@ -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: