Refactored beta

+Doxigen autogenerated docs
This commit is contained in:
2020-11-19 23:47:35 +03:00
parent 9fa9e0f481
commit 7bfe7ed330
601 changed files with 70469 additions and 72 deletions

View File

@@ -64,7 +64,17 @@ int out_dmx::PixelCtrl(itemCmd cmd, char* subItem, bool show)
//int out_dmx::PixelCtrl(itemCmd cmd)
{
if (!item || !show) return 0;
short cType=getChanType();
short cType=getChanType();
uint8_t storageType;
switch (cmd.getCmd()){
case CMD_OFF:
cmd.Percents(0);
break;
}
debugSerial<<F("DMX ctrl: "); cmd.debugOut();
if (cType==CH_DIMMER) //Single channel
{
@@ -72,9 +82,22 @@ if (cType==CH_DIMMER) //Single channel
return 1;
}
itemCmd st(ST_RGB,CMD_VOID);
st.assignFrom(cmd);
switch (cType)
{
case CH_RGB:
storageType=ST_RGB;
break;
case CH_RGBW:
storageType=ST_RGBW;
break;
default:
storageType=ST_PERCENTS;
}
itemCmd st(storageType,CMD_VOID);
st.assignFrom(cmd);
debugSerial<<F("Assigned:");st.debugOut();
switch (cType)
{
case CH_RGBW:

View File

@@ -119,6 +119,12 @@ if (!item || !iaddr || !show) return 0;
bool inverse = (item->getArg()<0);
short cType = getChanType();
switch (cmd.getCmd()){
case CMD_OFF:
cmd.Percents(0);
break;
}
if (cType=CH_PWM)
{ short k;
analogWrite(iaddr, k=cmd.getPercents255(inverse));