diff --git a/lighthub/dmx.cpp b/lighthub/dmx.cpp index e9f2df3..c16483f 100644 --- a/lighthub/dmx.cpp +++ b/lighthub/dmx.cpp @@ -21,9 +21,12 @@ e-mail anklimov@gmail.com //#include //#include #include "options.h" + #ifdef _dmxin +#if defined(__AVR__) #include #endif +#endif uint8_t * DMXin = NULL; int D_State=0; @@ -120,7 +123,7 @@ for (short tch=0; tch<=3 ; tch++) bool updated = 0; for (short trh=0; trh<4 ; trh++) - if ((t=DMXSerial.read(base+trh+1)) != DMXin[base+trh]) + if ((t=dmxin.read(base+trh+1)) != DMXin[base+trh]) { D_State |= (1< #endif +#endif #include "aJSON.h" diff --git a/lighthub/lighthub.ino b/lighthub/lighthub.ino index 1045ae9..6fb153c 100644 --- a/lighthub/lighthub.ino +++ b/lighthub/lighthub.ino @@ -47,7 +47,6 @@ Relay DMX array channel Config URL configuration todo DUE related: -DMX in (new lib) - to do HTTP PWM freq fix Config webserver @@ -857,7 +856,7 @@ void setup() { cmdInit(115200); - Serial.println(F("\nLazyhome.ru LightHub controller v0.95")); + Serial.println(F("\nLazyhome.ru LightHub controller v0.96")); short macvalid=0; byte defmac[6]={0xDE,0xAD,0xBE,0xEF,0xFE,0}; @@ -936,7 +935,7 @@ if (owReady && owArr) owLoop(); #endif #ifdef _dmxin - unsigned long lastpacket = DMXSerial.noDataSince(); +// unsigned long lastpacket = DMXSerial.noDataSince(); DMXCheck(); #endif // if (lastpacket && (lastpacket%10==0)) Serial.println(lastpacket); diff --git a/lighthub/options.h b/lighthub/options.h index 41ca622..fa55863 100644 --- a/lighthub/options.h +++ b/lighthub/options.h @@ -8,14 +8,14 @@ #if defined(__AVR__) //All options available -#define modbusSerial Serial2 +#define modbusSerial Serial2 +#define dmxin DMXSerial +#define dmxout DmxSimple #endif #if defined(__SAM3X8E__) -/// DMX not deployed yet -#undef _dmxin #define modbusSerial Serial2 -#define dmxout DmxDue4 +#define dmxout DmxDue1 #define dmxin DmxDue1 #endif