27 #include "ILEDController.h"
48 bool inline isValidChannelMode(
const ChannelMode channelMode) {
64 bool inline isValidPortType(
const PortType portType) {
69 #define GROUP_MODE_Rainbow_Wave 0x00
70 #define GROUP_MODE_Color_Shift 0x01
71 #define GROUP_MODE_Color_Pulse 0x02
72 #define GROUP_MODE_Color_Wave 0x03
73 #define GROUP_MODE_Static 0x04
74 #define GROUP_MODE_Temperature 0x05
75 #define GROUP_MODE_Visor 0x06
76 #define GROUP_MODE_Marquee 0x07
77 #define GROUP_MODE_Blink 0x08
78 #define GROUP_MODE_Sequential 0x09
79 #define GROUP_MODE_Rainbow 0x0A
84 enum class GroupSpeed : byte { High = 0x00, Medium = 0x01, Low = 0x02 };
86 bool inline isValidGroupSpeed(
const GroupSpeed groupSpeed) {
87 return groupSpeed == GroupSpeed::High || groupSpeed == GroupSpeed::Medium || groupSpeed == GroupSpeed::Low;
95 bool inline isValidGroupDirection(
const GroupDirection groupDirection) {
96 return groupDirection == GroupDirection::Backward || groupDirection == GroupDirection::Forward;
102 enum class GroupExtra : byte { Alternating = 0x00, Random = 0x01 };
104 bool inline isValidGroupExtra(
const GroupExtra groupExtra) {
105 return groupExtra == GroupExtra::Alternating || groupExtra == GroupExtra::Random;
108 #define GROUP_TEMP_GROUP_EXTERNAL 255
123 byte mode = GROUP_MODE_Rainbow_Wave;
127 byte tempGroup = GROUP_TEMP_GROUP_EXTERNAL;
154 uint8_t groupsSet = 0;
190 virtual void reset();
222 virtual bool setLEDGroup(uint8_t channel, uint8_t groupIndex,
LEDGroup& group);
233 virtual void setLEDColorValues(uint8_t channel, uint8_t color, uint8_t offset,
const uint8_t* values,
266 virtual bool clearLEDGroups(uint8_t channel);
283 virtual bool save() = 0;
284 virtual bool load() = 0;
ChannelMode
Definition: LEDController.h:37
GroupSpeed
Definition: LEDController.h:84
GroupExtra
Definition: LEDController.h:102
GroupDirection
Definition: LEDController.h:93
PortType
Definition: LEDController.h:57
Definition: CorsairLightingProtocolResponse.h:20
Definition: ILEDController.h:25
Definition: LEDController.h:161
virtual void handleLEDControl(const Command &command, const CorsairLightingProtocolResponse *response) override
Definition: LEDController.cpp:20
virtual void setLEDExternalTemperature(uint8_t channel, uint16_t temp)=0
virtual void clearLEDColorValues(uint8_t channel)=0
virtual void triggerLEDUpdate()=0
virtual void reset()
Definition: LEDController.cpp:217
virtual uint8_t getLEDAutodetectionResult(uint8_t channel)=0
bool triggerSave
Definition: LEDController.h:197
bool saveIfNeeded()
Definition: LEDController.cpp:269
virtual uint8_t getLEDStripMask(uint8_t channel, uint8_t group)
Definition: LEDController.cpp:224
virtual void setLEDColorValues(uint8_t channel, uint8_t color, uint8_t offset, const uint8_t *values, size_t len)=0
virtual void startLEDAutodetection(uint8_t channel)
Definition: LEDController.cpp:265
const LEDChannel & getChannel(uint8_t channelIndex)
Definition: LEDController.cpp:215
unsigned long lastCommand
Definition: LEDController.h:201
virtual bool isValidLEDChannel(const LEDChannel &ledChannel)
Definition: LEDController.cpp:196
virtual bool setLEDBrightness(uint8_t channel, uint8_t brightness)
Definition: LEDController.cpp:249
virtual bool setLEDMode(uint8_t channel, ChannelMode mode)
Definition: LEDController.cpp:241
virtual bool setLEDPortType(uint8_t channel, PortType ledPortType)
Definition: LEDController.cpp:257
virtual bool isValidLEDGroup(const LEDGroup &ledGroup)
Definition: LEDController.cpp:209
Definition: CorsairLightingProtocolConstants.h:110
Definition: LEDController.h:141
uint8_t brightness
Definition: LEDController.h:145
uint8_t ledCount
Definition: LEDController.h:150
Definition: LEDController.h:114
uint8_t ledCount
Definition: LEDController.h:122
uint8_t ledIndex
Definition: LEDController.h:118