|
@@ -3,18 +3,27 @@
|
|
|
#ifndef _MILIGHT_RADIO_CONFIG
|
|
#ifndef _MILIGHT_RADIO_CONFIG
|
|
|
#define _MILIGHT_RADIO_CONFIG
|
|
#define _MILIGHT_RADIO_CONFIG
|
|
|
|
|
|
|
|
|
|
+enum MiLightRadioType {
|
|
|
|
|
+ UNKNOWN = 0,
|
|
|
|
|
+ RGBW = 0xB8,
|
|
|
|
|
+ CCT = 0x5A,
|
|
|
|
|
+ RGBW_CCT = 0x99
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
class MiLightRadioConfig {
|
|
class MiLightRadioConfig {
|
|
|
public:
|
|
public:
|
|
|
MiLightRadioConfig(const uint16_t syncword0,
|
|
MiLightRadioConfig(const uint16_t syncword0,
|
|
|
const uint16_t syncword3,
|
|
const uint16_t syncword3,
|
|
|
const size_t packetLength,
|
|
const size_t packetLength,
|
|
|
const uint8_t* channels,
|
|
const uint8_t* channels,
|
|
|
- const size_t numChannels)
|
|
|
|
|
|
|
+ const size_t numChannels,
|
|
|
|
|
+ const MiLightRadioType type)
|
|
|
: syncword0(syncword0),
|
|
: syncword0(syncword0),
|
|
|
syncword3(syncword3),
|
|
syncword3(syncword3),
|
|
|
packetLength(packetLength),
|
|
packetLength(packetLength),
|
|
|
channels(channels),
|
|
channels(channels),
|
|
|
- numChannels(numChannels)
|
|
|
|
|
|
|
+ numChannels(numChannels),
|
|
|
|
|
+ type(type)
|
|
|
{}
|
|
{}
|
|
|
|
|
|
|
|
const uint16_t syncword0;
|
|
const uint16_t syncword0;
|
|
@@ -22,21 +31,22 @@ public:
|
|
|
const size_t packetLength;
|
|
const size_t packetLength;
|
|
|
const uint8_t* channels;
|
|
const uint8_t* channels;
|
|
|
const size_t numChannels;
|
|
const size_t numChannels;
|
|
|
|
|
+ const MiLightRadioType type;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const uint8_t RGBW_CHANNELS[] = {9, 40, 71};
|
|
const uint8_t RGBW_CHANNELS[] = {9, 40, 71};
|
|
|
static MiLightRadioConfig MilightRgbwConfig(
|
|
static MiLightRadioConfig MilightRgbwConfig(
|
|
|
- 0x147A, 0x258B, 7, RGBW_CHANNELS, 3
|
|
|
|
|
|
|
+ 0x147A, 0x258B, 7, RGBW_CHANNELS, 3, RGBW
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
const uint8_t CCT_CHANNELS[] = {4, 39, 74};
|
|
const uint8_t CCT_CHANNELS[] = {4, 39, 74};
|
|
|
static MiLightRadioConfig MilightCctConfig(
|
|
static MiLightRadioConfig MilightCctConfig(
|
|
|
- 0x050A, 0x55AA, 7, CCT_CHANNELS, 3
|
|
|
|
|
|
|
+ 0x050A, 0x55AA, 7, CCT_CHANNELS, 3, CCT
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
const uint8_t RGBWCCT_CHANNELS[] = {70, 39, 8};
|
|
const uint8_t RGBWCCT_CHANNELS[] = {70, 39, 8};
|
|
|
static MiLightRadioConfig MilightRgbwCctConfig(
|
|
static MiLightRadioConfig MilightRgbwCctConfig(
|
|
|
- 0x7236, 0x1809, 8, RGBWCCT_CHANNELS, 3
|
|
|
|
|
|
|
+ 0x7236, 0x1809, 8, RGBWCCT_CHANNELS, 3, RGBW_CCT
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
#endif
|
|
#endif
|