Debugged+Doxigen

This commit is contained in:
2020-11-21 20:01:02 +03:00
parent 7bfe7ed330
commit 3ab5a9fbc7
1067 changed files with 26612 additions and 5563 deletions

View File

@@ -88,6 +88,7 @@ int txt2subItem(char *payload) {
if (!payload || !strlen(payload)) return S_NOTFOUND;
// Check for command
if (strcmp_P(payload, SET_P) == 0) cmd = S_SET;
else if (strcmp_P(payload, ESET_P) == 0) cmd = S_ESET;
else if (strcmp_P(payload, CMD_P) == 0) cmd = S_CMD;
else if (strcmp_P(payload, MODE_P) == 0) cmd = S_MODE;
else if (strcmp_P(payload, HSV_P) == 0) cmd = S_HSV;
@@ -470,6 +471,20 @@ int cmd = txt2cmd(payload);
debugSerial<<F("Txt2Cmd:")<<cmd<<endl;
itemCmd st(ST_VOID,cmd);
bool set255flag=false;
switch (suffixCode) {
case S_ESET:
set255flag=true;
suffixCode=S_SET;
break;
case S_HSV:
cmd=CMD_HSV;
break;
case S_RGB:
cmd=CMD_RGB;
break;
}
st.setSuffix(suffixCode);
switch (cmd) {
@@ -478,13 +493,14 @@ st.setSuffix(suffixCode);
st.Int((int32_t)getInt((char **) &payload));
return Ctrl(st,subItem);
break;
case CMD_HSV: st.Cmd(0);
case CMD_HSV:
st.Cmd(0);
case CMD_VOID:
{
//Parsing integers from payload
short i = 0;
int Par[3];
while (payload && i < 3)
int Par[4];
while (payload && i < 4)
Par[i++] = getInt((char **) &payload);
switch(suffixCode)
@@ -497,15 +513,28 @@ st.setSuffix(suffixCode);
default:
switch (i) //Number of params
{
case 1: st.Percents(Par[0]); //ToDo float
case 1:
if (set255flag)
st.Percents255(Par[0]);
else st.Percents(Par[0]); //ToDo float
break;
case 2: st.HS(Par[0],Par[1]);
break;
case 3: st.HSV(Par[0],Par[1],Par[2]);
case 3:
if (set255flag)
st.HSV255(Par[0],Par[1],Par[2]);
else st.HSV(Par[0],Par[1],Par[2]);
break;
case 4:
if (set255flag)
st.HSV255(Par[0],Par[1],Par[2]);
else st.HSV(Par[0],Par[1],Par[2]);
st.setColorTemp(Par[3]);
break;
default:;
}
}
//return Ctrl(setCommand, i, Par, suffixCode, subItem);
return Ctrl(st,subItem);
}
break;
@@ -541,7 +570,7 @@ return 0;
int Item::Ctrl(itemCmd cmd, char* subItem)
{
char stringBuffer[16];
//char stringBuffer[16];
int suffixCode = cmd.getSuffix();
bool operation = isNotRetainingStatus() ;
@@ -555,7 +584,8 @@ int Item::Ctrl(itemCmd cmd, char* subItem)
suffixCode = defaultSuffixCode;
debugSerial<<F("RAM=")<<freeRam()<<F(" Item=")<<itemArr->name<<F(" Sub=")<<subItem<<F(" Suff=")<<suffixCode<<F(" Cmd=")<<cmd.getCmd()<<F(" Par=")<<cmd.toString(stringBuffer, sizeof(stringBuffer))<<endl;
debugSerial<<F("RAM=")<<freeRam()<<F(" Item=")<<itemArr->name<<F(" Sub=")<<subItem;
cmd.debugOut();
if (!itemArr) return -1;
bool chActive = (isActive()>0);
@@ -647,6 +677,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem)
case S_NOTFOUND:
toExecute=true;
case S_SET:
//case S_ESET:
if (st.incrementPercents(step))
{
st.saveItem(this);
@@ -685,6 +716,7 @@ int Item::Ctrl(itemCmd cmd, char* subItem)
// continue processing as SET
case S_SET:
//case S_ESET:
if (itemType == CH_GROUP && cmd.isColor()) st.setArgType(ST_HSV);//Extend storage for group channel
st.assignFrom(cmd);
st.saveItem(this);
@@ -856,6 +888,7 @@ switch (itemType) {
SendStatus(SEND_COMMAND);
}
}
return 1;
}
@@ -1039,6 +1072,7 @@ int Item::modbusDimmerSet(itemCmd st)
if (_maxval) return modbusDimmerSet(_addr, _reg, _regType, _mask, map(value, 0, 100, 0, _maxval));
else return modbusDimmerSet(_addr, _reg, _regType, _mask, value);
}
return 0;
}
#endif
@@ -1074,7 +1108,7 @@ int Item::VacomSetFan(itemCmd st) {
return 0;
}
modbusBusy = 1;
uint8_t j;//, result;
//uint8_t j;//, result;
//uint16_t data[1];
modbusSerial.begin(9600, fmPar);
@@ -1289,6 +1323,7 @@ int Item::checkFM() {
free(outch);
aJson.deleteItem(out);
modbusBusy = 0;
return 1;
}
boolean Item::checkModbusRetry() {
@@ -1402,7 +1437,7 @@ int Item::checkModbusDimmer() {
debugSerial << F("Modbus polling error=") << _HEX(result) << endl;
modbusBusy = 0;
return 1;
}
@@ -1435,6 +1470,7 @@ int Item::checkModbusDimmer(int data) {
}
}
} //if data changed
return 1;
}
#endif
@@ -1502,7 +1538,9 @@ int Item::SendStatus(int sendFlags) {
return -1;
}
else {
int chancmd=getCmd();
itemCmd st(ST_VOID,CMD_VOID);
st.loadItem(this, true);
sendFlags |= getFlag(SEND_COMMAND | SEND_PARAMETERS); //if some delayed status is pending
char addrstr[48];
@@ -1511,45 +1549,14 @@ int Item::SendStatus(int sendFlags) {
if (sendFlags & SEND_PARAMETERS)
{
// Preparing parameters payload //////////
/*
itemArgStore st;
int chanType = itemType;
if (driver) chanType = driver->getChanType();
//retrive stored values
st.aslong = getVal();
switch (chanType) {
//case CH_GROUP:
case CH_RGBW:
case CH_RGB:
snprintf(valstr, sizeof(valstr), "%d,%d,%d", st.h,st.s,st.v);
break;
case CH_GROUP:
//if (st.hsv_flag)
if (getSubtype()==ST_HSV)
snprintf(valstr, sizeof(valstr), "%d,%d,%d", st.h,st.s,st.v);
else
snprintf(valstr, sizeof(valstr), "%d", st.v);
break;
case CH_RELAY:
sendFlags &= ~SEND_PARAMETERS; //No need to send value for relay
break;
default:
snprintf(valstr, sizeof(valstr), "%ld", st.aslong);
}//itemtype
*/
// Preparing parameters payload //////////
st.toString(valstr, sizeof(valstr), SEND_PARAMETERS);
}
itemCmd st(ST_VOID,CMD_VOID);
st.loadItem(this, true);
st.toString(valstr, sizeof(valstr), SEND_PARAMETERS);
}
if (sendFlags & SEND_COMMAND)
{
// Preparing Command payload //////////////
switch (chancmd) {
switch (st.getCmd()) {
case CMD_ON:
case CMD_XON:
case CMD_AUTO:
@@ -1561,8 +1568,7 @@ int Item::SendStatus(int sendFlags) {
case CMD_HALT:
strcpy_P(cmdstr, OFF_P);
break;
case 0:
/// case CMD_SET:
case CMD_VOID:
sendFlags &= ~SEND_COMMAND; // Not send command for parametrized req
break;
default:
@@ -1570,13 +1576,14 @@ int Item::SendStatus(int sendFlags) {
sendFlags &= ~SEND_COMMAND;
}
}
//publish to MQTT - OpenHab Legacy style to myhome/s_out/item flat values
if (st.getArgType()!=ST_RGB && st.getArgType()!=ST_RGBW) {
//publish to MQTT - OpenHab Legacy style to myhome/s_out/item flat values
setTopic(addrstr,sizeof(addrstr),T_OUT);
strncat(addrstr, itemArr->name, sizeof(addrstr)-1);
if (mqttClient.connected() && !ethernetIdleCount)
{
if (sendFlags & SEND_PARAMETERS && chancmd != CMD_OFF && chancmd != CMD_HALT)
if (sendFlags & SEND_PARAMETERS && st.getCmd() != CMD_OFF && st.getCmd() != CMD_HALT)
{
mqttClient.publish(addrstr, valstr, true);
debugSerial<<F("Pub: ")<<addrstr<<F("->")<<valstr<<endl;
@@ -1594,7 +1601,7 @@ int Item::SendStatus(int sendFlags) {
setFlag(sendFlags);
return 0;
}
}
// publush to MQTT - New style to
// myhome/s_out/item/cmd
// myhome/s_out/item/set
@@ -1604,8 +1611,19 @@ int Item::SendStatus(int sendFlags) {
setTopic(addrstr,sizeof(addrstr),T_OUT);
strncat(addrstr, itemArr->name, sizeof(addrstr)-1);
strncat(addrstr, "/", sizeof(addrstr));
strncat_P(addrstr, SET_P, sizeof(addrstr));
switch (st.getArgType()) {
case ST_RGB:
case ST_RGBW:
strncat_P(addrstr, RGB_P, sizeof(addrstr));
break;
case ST_PERCENTS255:
case ST_HSV255:
strncat_P(addrstr, ESET_P, sizeof(addrstr));
break;
default:
strncat_P(addrstr, SET_P, sizeof(addrstr));
}
debugSerial<<F("Pub: ")<<addrstr<<F("->")<<valstr<<endl;
if (mqttClient.connected() && !ethernetIdleCount)
@@ -1624,7 +1642,7 @@ int Item::SendStatus(int sendFlags) {
if (sendFlags & SEND_COMMAND)
{
// Some additional preparing for extended set of commands:
switch (chancmd) {
switch (st.getCmd()) {
case CMD_AUTO:
strcpy_P(cmdstr, AUTO_P);
break;

View File

@@ -24,16 +24,17 @@ e-mail anklimov@gmail.com
#define S_NOTFOUND 0
//#define S_SETnCMD 0
#define S_CMD 1
#define S_SET 2
#define S_HSV 3
#define S_RGB 4
#define S_FAN 5
#define S_MODE 6
#define S_HUE 7
#define S_SAT 8
#define S_TEMP 9
#define S_ADDITIONAL 9
#define S_CMD 1
#define S_SET 2
#define S_ESET 4
#define S_HSV 5
#define S_RGB 6
#define S_FAN 7
#define S_MODE 8
#define S_HUE 9
#define S_SAT 10
#define S_TEMP 11
#define S_ADDITIONAL 11
#define CH_DIMMER 0 //DMX 1 ch
#define CH_RGBW 1 //DMX 4 ch

View File

@@ -9,6 +9,7 @@
#else
#include "FastLED.h"
#endif
//#include "hsv2rgb.h"
int txt2cmd(char *payload) {
int cmd = CMD_UNKNOWN;
@@ -22,21 +23,22 @@ int txt2cmd(char *payload) {
else
{
for(uint8_t i=1; i<commandsNum ;i++)
if (strcmp_P(payload, commands_P[i]) == 0)
if (strncmp_P(payload, commands_P[i], strlen_P(commands_P[i])) == 0)
{
// debugSerial<< i << F(" ") << pgm_read_word_near(&serialModes_P[i].mode)<< endl;
return i;
}
}
/*
else if (strncmp_P(payload, HSV_P, strlen (HSV_P)) == 0) cmd = CMD_HSV;
else if (strncmp_P(payload, RGB_P, strlen (RGB_P)) == 0) cmd = CMD_RGB;
*/
return cmd;
}
/*!
\brief Constructor with definition of type and command
\param type - type of value (ST_???, ST_VOID by default)
\param code - code of command (CMD_VOID by default)
*/
itemCmd::itemCmd(uint8_t _type, uint8_t _code)
{
cmd.aslong=0;
@@ -46,6 +48,12 @@ itemCmd::itemCmd(uint8_t _type, uint8_t _code)
cmd.cmdCode=_code;
}
/*!
\brief Constructor with definition of FLOAT value in storage
\param float
\param type - type of value (ST_FLOAT or ST_FLOAT_CELSIUS or ST_FLOAT_FARENHEIT) - optional
*/
itemCmd::itemCmd(float val)
{
cmd.aslong=0;
@@ -133,14 +141,16 @@ bool itemCmd::setS(uint8_t s)
case ST_VOID:
cmd.itemArgType=ST_HSV;
case ST_HSV:
case ST_HSV255:
if (par>100) par=100;
param.s=par;
break;
/*
case ST_HSV255:
if (par>255) par=255;
if (par<0) par=0;
param.s=par;
break;
break;*/
default:
// debugSerial<<F("Can't assign saturation to type ")<<cmd.itemArgType<<endl;
return false;
@@ -148,6 +158,42 @@ bool itemCmd::setS(uint8_t s)
return true;
}
//! Setup color tempetature parameter for HSV or HSV255 types. It must be 0..100 value.
//! 0 - cold, 100 - warm light
bool itemCmd::setColorTemp(uint8_t t)
{
int par=t;
switch (cmd.itemArgType)
{
case ST_VOID:
cmd.itemArgType=ST_HSV;
case ST_HSV:
case ST_HS:
if (par>100) par=100;
// value 0 is reserved for default/uninitialized value. Internally data stored in 1..101 range (7 bits)
param.colorTemp=par+1;
break;
case ST_HSV255:
if (par>100) par=100;
if (par<0) par=0;
param.colorTemp=par+1;
break;
default:
return false;
}
return true;
}
//! Setup color tempetature parameter from HSV or HSV255 types. return 0..100 value in success.
//! -1 - if no value stored
int8_t itemCmd::getColorTemp()
{
if (cmd.itemArgType!=ST_HSV and cmd.itemArgType!=ST_HSV255 and cmd.itemArgType!=ST_HS) return -1;
return param.colorTemp-1;
}
uint16_t itemCmd::getH()
{
return param.h;
@@ -203,16 +249,18 @@ bool itemCmd::incrementS(int16_t dif)
{
//case ST_PERCENTS:
case ST_HSV:
case ST_HSV255:
par+=dif;
if (par>100) par=100;
if (par<0) par=0;
break;
/*
//case ST_PERCENTS255:
case ST_HSV255:
par+=dif;
if (par>255) par=255;
if (par<0) par=0;
break;
break; */
default: return false;
}
param.s=par;
@@ -251,7 +299,8 @@ itemCmd itemCmd::assignFrom(itemCmd from)
break;
case ST_HSV255:
param.h=from.param.h;
param.s=map(from.param.s,0,255,0,100);
//param.s=map(from.param.s,0,255,0,100);
param.s=from.param.s;
param.v=map(from.param.v,0,255,0,100);
break;
case ST_PERCENTS255:
@@ -280,7 +329,8 @@ itemCmd itemCmd::assignFrom(itemCmd from)
param.v=map(from.param.v,0,100,0,255);
case ST_HSV:
param.h=from.param.h;
param.s=map(from.param.s,0,100,0,255);
param.s=from.param.s;
//param.s=map(from.param.s,0,100,0,255);
break;
case ST_PERCENTS:
param.v=map(from.param.v,0,100,0,255);
@@ -316,7 +366,61 @@ itemCmd itemCmd::assignFrom(itemCmd from)
case ST_RGBW:
case ST_RGB:
param.asInt32=from.param.asInt32;
break;
break;
// Those types are not possible to apply over RGB without convertion toward HSV
case ST_PERCENTS255:
case ST_PERCENTS:
case ST_HS:
{
#ifndef ADAFRUIT_LED
// Restoring HSV from RGB
CRGB rgb;
rgb.r = param.r;
rgb.g = param.g;
rgb.b = param.b;
CHSV hsv = rgb2hsv_approximate(rgb);
#endif
switch (from.cmd.itemArgType){
case ST_PERCENTS255:
#ifndef ADAFRUIT_LED
from.param.h = map(hsv.h, 0, 255, 0, 365);
from.param.s = map(hsv.s, 0, 255, 0, 100);
#else
from.param.h=100;
from.param.s=0;
#endif
from.cmd.itemArgType=ST_HSV255;
break;
case ST_PERCENTS:
#ifndef ADAFRUIT_LED
from.param.h = map(hsv.h, 0, 255, 0, 365);
from.param.s = map(hsv.s, 0, 255, 0, 100);
#else
from.param.h=100;
from.param.s=0;
#endif
from.cmd.itemArgType=ST_HSV255;
break;
case ST_HS:
#ifndef ADAFRUIT_LED
from.param.v = hsv.v;
#else
from.param.v=255;
#endif
from.cmd.itemArgType=ST_HSV255;
break;
}
}
//Converting current obj to HSV
debugSerial<<F("Updated:"); from.debugOut();
param=from.param;
cmd=from.cmd;
return *this;
case ST_HSV255:
HSV255_flag=true;
case ST_HSV:
@@ -326,7 +430,8 @@ itemCmd itemCmd::assignFrom(itemCmd from)
if (HSV255_flag)
{
rgbSaturation = from.param.s;
//rgbSaturation = from.param.s;
rgbSaturation =map(from.param.s, 0, 100, 0, 255);
rgbValue = from.param.v;
}
else
@@ -397,6 +502,8 @@ long int itemCmd::getInt()
case ST_INT32:
case ST_UINT32:
case ST_RGB:
case ST_RGBW:
return param.aslong;
case ST_PERCENTS:
@@ -409,6 +516,8 @@ long int itemCmd::getInt()
case ST_FLOAT_CELSIUS:
case ST_FLOAT_FARENHEIT:
return int (param.asfloat);
default:
return 0;
}
@@ -538,6 +647,17 @@ itemCmd itemCmd::HSV(uint16_t h, uint8_t s, uint8_t v)
return *this;
}
itemCmd itemCmd::HSV255(uint16_t h, uint8_t s, uint8_t v)
{
cmd.itemArgType=ST_HSV255;
param.h=h;
param.s=s;
param.v=v;
return *this;
}
itemCmd itemCmd::HS(uint16_t h, uint8_t s)
{
cmd.itemArgType=ST_HS;
@@ -647,7 +767,7 @@ char * itemCmd::toString(char * Buffer, int bufLen, int sendFlags )
}
if (sendFlags & SEND_PARAMETERS)
switch (cmd.itemArgType)
{
{ short colorTemp;
case ST_PERCENTS:
case ST_PERCENTS255:
@@ -662,7 +782,12 @@ char * itemCmd::toString(char * Buffer, int bufLen, int sendFlags )
break;
case ST_HSV:
case ST_HSV255:
snprintf(argPtr, bufLen, "%d,%d,%d", param.h, param.s, param.v);
colorTemp=getColorTemp();
if (colorTemp<0)
snprintf(argPtr, bufLen, "%d,%d,%d", param.h, param.s, param.v);
else
snprintf(argPtr, bufLen, "%d,%d,%d,%d", param.h, param.s, param.v, colorTemp);
break;
case ST_HS:

View File

@@ -19,7 +19,6 @@ e-mail anklimov@gmail.com
*/
#pragma once
#include "Arduino.h"
///#include "item.h"
typedef char cmdstr[9];
@@ -31,39 +30,38 @@ const cmdstr commands_P[] PROGMEM =
};
#define commandsNum sizeof(commands_P)/sizeof(cmdstr)
#define CMD_ON 1
#define CMD_OFF 2
#define CMD_RESTORE 3 //on only if was turned off by CMD_HALT
#define CMD_TOGGLE 4
#define CMD_HALT 5 //just Off
#define CMD_XON 6 //just on
#define CMD_XOFF 7 //off only if was previously turned on by CMD_XON
#define CMD_UP 8 //increase
#define CMD_DN 9 //decrease
#define CMD_HEAT 0xa
#define CMD_COOL 0xb
#define CMD_AUTO 0xc
#define CMD_FAN 0xd
#define CMD_DRY 0xe
#define CMD_STOP 0xf
#define CMD_HIGH 0x10 //AC fan leve
#define CMD_MED 0x11
#define CMD_LOW 0x12
#define CMD_ENABLED 0x13
#define CMD_DISABLED 0x14
#define CMD_TRUE 0x15
#define CMD_FALSE 0x16
#define CMD_RGB 0x17
/// Definition of Commands
#define CMD_ON 1 /// Turn channel ON
#define CMD_OFF 2 /// Turn channel OFF
#define CMD_RESTORE 3 /// Turn ON only if was previously turned off by CMD_HALT
#define CMD_TOGGLE 4 /// Toggle ON/OFF
#define CMD_HALT 5 /// Just Off
#define CMD_XON 6 /// Just on
#define CMD_XOFF 7 /// OFF only if was previously turned on by CMD_XON
#define CMD_UP 8 /// increase
#define CMD_DN 9 /// decrease
#define CMD_HEAT 0xa /// Thermostat/AC set to HEATing mode
#define CMD_COOL 0xb /// Thermostat/AC set to COOLing mode
#define CMD_AUTO 0xc /// Thermostat/AC set to Auto mode
#define CMD_FAN 0xd /// AC set to Fan-only mode
#define CMD_DRY 0xe /// AC set to Dry mode
#define CMD_STOP 0xf /// stop dimming (for further use)
#define CMD_HIGH 0x10 /// AC/Vent fan level HIGH
#define CMD_MED 0x11 /// AC/Vent fan level MEDIUM
#define CMD_LOW 0x12 /// AC/Vent fan level LOW
#define CMD_ENABLED 0x13 /// Aliase for ON
#define CMD_DISABLED 0x14 /// Aliase for OFF
#define CMD_TRUE 0x15 /// Aliase for ON
#define CMD_FALSE 0x16 /// Aliase for OFF
#define CMD_RGB 0x17
#define CMD_HSV 0x18
//#define CMD_CURTEMP 0xf
#define CMD_MASK 0xff
#define FLAG_MASK 0xff00
#define CMD_VOID 0
#define CMD_UNKNOWN -1
#define CMD_JSON -2
//#define CMD_RGB -3
//#define CMD_HSV -4
#define SEND_COMMAND 0x100
#define SEND_PARAMETERS 0x200
@@ -95,21 +93,22 @@ ST_FLOAT = 13//,
};
*/
#define ST_VOID 0
#define ST_PERCENTS 1
#define ST_TENS 2
#define ST_HSV 3
#define ST_HS 4
#define ST_FLOAT_CELSIUS 5
#define ST_FLOAT_FARENHEIT 6
#define ST_RGB 7
#define ST_RGBW 8
#define ST_PERCENTS255 9
#define ST_HSV255 10
#define ST_INT32 11
#define ST_UINT32 12
#define ST_STRING 13
#define ST_FLOAT 14
///Definition of all possible types of argument, contained in class
#define ST_VOID 0 /// Not defined
#define ST_PERCENTS 1 /// Percent value 0..100
#define ST_TENS 2 /// Int representation of Float point value in tens part (ex 12.3 = 123 in "tens")
#define ST_HSV 3 /// HUE-SATURATION-VALUE representation of color (0..365, 0..100, 0..100)
#define ST_HS 4 /// just hue and saturation
#define ST_FLOAT_CELSIUS 5 /// Float value - temperature in Celsium
#define ST_FLOAT_FARENHEIT 6 /// Float value - temperature in Farenheit
#define ST_RGB 7 /// RGB replesentation of color
#define ST_RGBW 8 /// RGB + White channel
#define ST_PERCENTS255 9 /// Percent value 0..255
#define ST_HSV255 10 /// HUE-SATURATION-VALUE representation of color (0..365, 0..255, 0..255)
#define ST_INT32 11 /// 32 bits signed integer
#define ST_UINT32 12 /// 32 bits unsigned integer
#define ST_STRING 13 /// pointer to string (for further use)
#define ST_FLOAT 14 /// generic Float value
#pragma pack(push, 1)
@@ -153,18 +152,18 @@ typedef union
uint8_t s;
uint16_t h:9;
uint16_t colorTemp:7;
};
};
struct
{ int8_t signed_v;
int8_t signed_s;
int16_t signed_h:9;
int16_t signed_colorTemp:7;
};
struct
};
struct //Should be NeoPixel packed Color compatible
{
uint8_t r;
uint8_t g;
uint8_t b;
uint8_t g;
uint8_t r;
uint8_t w;
};
} itemArgStore;
@@ -187,11 +186,14 @@ public:
itemCmd Int(uint32_t i);
itemCmd Cmd(uint8_t i);
itemCmd HSV(uint16_t h, uint8_t s, uint8_t v);
itemCmd HSV255(uint16_t h, uint8_t s, uint8_t v);
itemCmd HS(uint16_t h, uint8_t s);
itemCmd RGB(uint8_t r, uint8_t g, uint8_t b);
itemCmd RGBW(uint8_t r, uint8_t g, uint8_t b, uint8_t w);
bool setH(uint16_t);
bool setS(uint8_t);
bool setColorTemp(uint8_t);
int8_t getColorTemp();
uint16_t getH();
uint16_t getS();
itemCmd setArgType(uint8_t);

View File

@@ -105,6 +105,7 @@ const char ERROR_P[] PROGMEM = "ERR";
// SubTopics
const char SET_P[] PROGMEM = "set";
const char ESET_P[] PROGMEM = "eset";
const char CMD_P[] PROGMEM = "cmd";
const char MODE_P[] PROGMEM = "mode";
const char FAN_P[] PROGMEM = "fan";