mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Adalight - HyperSerial Support (#1515)
* HyperSerial support * Migrate Adalight records to new structure * Serial Devices - Select baud rate and allow providing a custom one
This commit is contained in:
@@ -4,6 +4,16 @@
|
||||
// hyperion includes
|
||||
#include "ProviderRs232.h"
|
||||
|
||||
namespace Adalight
|
||||
{
|
||||
typedef enum ProtocolType
|
||||
{
|
||||
ADA = 0,
|
||||
LBAPA,
|
||||
AWA
|
||||
} PROTOCOLTYPE;
|
||||
}
|
||||
|
||||
///
|
||||
/// Implementation of the LedDevice interface for writing to an Adalight LED-device.
|
||||
///
|
||||
@@ -37,6 +47,11 @@ private:
|
||||
///
|
||||
bool init(const QJsonObject &deviceConfig) override;
|
||||
|
||||
///
|
||||
/// @brief Prepare the protocol's header
|
||||
///
|
||||
void prepareHeader();
|
||||
|
||||
///
|
||||
/// @brief Writes the RGB-Color values to the LEDs.
|
||||
///
|
||||
@@ -45,8 +60,17 @@ private:
|
||||
///
|
||||
int write(const std::vector<ColorRgb> & ledValues) override;
|
||||
|
||||
const short _headerSize;
|
||||
bool _ligthBerryAPA102Mode;
|
||||
void whiteChannelExtension(uint8_t*& writer);
|
||||
|
||||
qint64 _bufferLength;
|
||||
|
||||
Adalight::PROTOCOLTYPE _streamProtocol;
|
||||
|
||||
bool _white_channel_calibration;
|
||||
uint8_t _white_channel_limit;
|
||||
uint8_t _white_channel_red;
|
||||
uint8_t _white_channel_green;
|
||||
uint8_t _white_channel_blue;
|
||||
};
|
||||
|
||||
#endif // LEDEVICETADALIGHT_H
|
||||
|
Reference in New Issue
Block a user