mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 03:39:49 +03:00
Retained MQTT topics logic developed, unused sources (SD & extra 1-wire) moved to spare folders to save static RAM
This commit is contained in:
@@ -17,13 +17,13 @@ bool shouldSaveConfig = false;
|
|||||||
|
|
||||||
//callback notifying us of the need to save config
|
//callback notifying us of the need to save config
|
||||||
void saveConfigCallback () {
|
void saveConfigCallback () {
|
||||||
Serial.println("Should save config");
|
Serial.println(F("Should save config"));
|
||||||
shouldSaveConfig = true;
|
shouldSaveConfig = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void espSetup () {
|
void espSetup () {
|
||||||
Serial.println("Setting up Wifi");
|
Serial.println(F("Setting up Wifi"));
|
||||||
shouldSaveConfig = true;
|
shouldSaveConfig = true;
|
||||||
//WiFiManager
|
//WiFiManager
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ void espSetup () {
|
|||||||
wifiManager.setMinimumSignalQuality();
|
wifiManager.setMinimumSignalQuality();
|
||||||
|
|
||||||
if (!wifiManager.autoConnect()) {
|
if (!wifiManager.autoConnect()) {
|
||||||
Serial.println("failed to connect and hit timeout");
|
Serial.println(F("failed to connect and hit timeout"));
|
||||||
delay(3000);
|
delay(3000);
|
||||||
//reset and try again, or maybe put it to deep sleep
|
//reset and try again, or maybe put it to deep sleep
|
||||||
ESP.reset();
|
ESP.reset();
|
||||||
@@ -45,7 +45,7 @@ if (!wifiManager.autoConnect()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if you get here you have connected to the WiFi
|
//if you get here you have connected to the WiFi
|
||||||
Serial.println("connected...yeey :)");
|
Serial.println(F("connected...yeey :)"));
|
||||||
|
|
||||||
//read updated parameters
|
//read updated parameters
|
||||||
strcpy(mqtt_password, custom_mqtt_password.getValue());
|
strcpy(mqtt_password, custom_mqtt_password.getValue());
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ void Input::Parse()
|
|||||||
|
|
||||||
|
|
||||||
s = aJson.getObjectItem(inputObj,"S");
|
s = aJson.getObjectItem(inputObj,"S");
|
||||||
if (!s) { Serial.print("In: ");Serial.print(pin);Serial.print("/");Serial.println(inType);
|
if (!s) { Serial.print(F("In: "));Serial.print(pin);Serial.print(F("/"));Serial.println(inType);
|
||||||
aJson.addNumberToObject(inputObj,"S", 0);
|
aJson.addNumberToObject(inputObj,"S", 0);
|
||||||
s = aJson.getObjectItem(inputObj,"S");
|
s = aJson.getObjectItem(inputObj,"S");
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ int Input::Poll()
|
|||||||
|
|
||||||
void Input::Changed (int val)
|
void Input::Changed (int val)
|
||||||
{
|
{
|
||||||
Serial.print(pin);Serial.print("=");Serial.println(val);
|
Serial.print(pin);Serial.print(F("="));Serial.println(val);
|
||||||
aJsonObject * item = aJson.getObjectItem(inputObj,"item");
|
aJsonObject * item = aJson.getObjectItem(inputObj,"item");
|
||||||
aJsonObject * scmd = aJson.getObjectItem(inputObj,"scmd");
|
aJsonObject * scmd = aJson.getObjectItem(inputObj,"scmd");
|
||||||
aJsonObject * rcmd = aJson.getObjectItem(inputObj,"rcmd");
|
aJsonObject * rcmd = aJson.getObjectItem(inputObj,"rcmd");
|
||||||
@@ -121,11 +121,11 @@ void Input::Changed (int val)
|
|||||||
|
|
||||||
if (val)
|
if (val)
|
||||||
{ //send set command
|
{ //send set command
|
||||||
if (!scmd) mqttClient.publish(emit->valuestring,"ON"); else if (strlen(scmd->valuestring)) mqttClient.publish(emit->valuestring,scmd->valuestring);
|
if (!scmd) mqttClient.publish(emit->valuestring,"ON",true); else if (strlen(scmd->valuestring)) mqttClient.publish(emit->valuestring,scmd->valuestring,true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //send reset command
|
{ //send reset command
|
||||||
if (!rcmd) mqttClient.publish(emit->valuestring,"OFF"); else if (strlen(rcmd->valuestring)) mqttClient.publish(emit->valuestring,rcmd->valuestring);
|
if (!rcmd) mqttClient.publish(emit->valuestring,"OFF",true); else if (strlen(rcmd->valuestring)) mqttClient.publish(emit->valuestring,rcmd->valuestring,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ GIT: https://github.com/anklimov/lighthub
|
|||||||
e-mail anklimov@gmail.com
|
e-mail anklimov@gmail.com
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
#include "options.h"
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
#include "aJSON.h"
|
#include "aJSON.h"
|
||||||
|
|
||||||
@@ -41,8 +41,8 @@ extern aJsonObject *modbusitem;
|
|||||||
int modbusSet(int addr, uint16_t _reg, int _mask, uint16_t value);
|
int modbusSet(int addr, uint16_t _reg, int _mask, uint16_t value);
|
||||||
|
|
||||||
extern PubSubClient mqttClient;
|
extern PubSubClient mqttClient;
|
||||||
//extern const char* outprefix;
|
//extern char outprefix[];
|
||||||
const char outprefix[] PROGMEM = "/myhome/s_out/";
|
const char outprefix[] PROGMEM = OUTTOPIC;
|
||||||
|
|
||||||
static unsigned long lastctrl = 0;
|
static unsigned long lastctrl = 0;
|
||||||
static aJsonObject *lastobj = NULL;
|
static aJsonObject *lastobj = NULL;
|
||||||
@@ -252,7 +252,7 @@ int Item::Ctrl(short cmd, short n, int *Par, boolean send) {
|
|||||||
case CH_VC:
|
case CH_VC:
|
||||||
case CH_DIMMER:
|
case CH_DIMMER:
|
||||||
case CH_MODBUS:
|
case CH_MODBUS:
|
||||||
SendCmd(0, 1, Par); // Send back parameter for channel above this line
|
if (send) SendCmd(0, 1, Par); // Send back parameter for channel above this line
|
||||||
case CH_THERMO:
|
case CH_THERMO:
|
||||||
case CH_VCTEMP:
|
case CH_VCTEMP:
|
||||||
setVal(Par[0]); // Store value
|
setVal(Par[0]); // Store value
|
||||||
@@ -279,7 +279,7 @@ int Item::Ctrl(short cmd, short n, int *Par, boolean send) {
|
|||||||
Par[1] = st.s;
|
Par[1] = st.s;
|
||||||
Par[2] = st.v;
|
Par[2] = st.v;
|
||||||
params = 3;
|
params = 3;
|
||||||
SendCmd(0, params, Par); // Send restored triplet
|
SendCmd(0, params, Par); // Send restored triplet. In any cases
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
@@ -291,15 +291,15 @@ int Item::Ctrl(short cmd, short n, int *Par, boolean send) {
|
|||||||
|
|
||||||
Par[0] = st.aslong;
|
Par[0] = st.aslong;
|
||||||
params = 1;
|
params = 1;
|
||||||
SendCmd(0, params, Par); // Send restored parameter
|
SendCmd(0, params, Par); // Send restored parameter, even if send=false - no problem, loop will be supressed at next hop
|
||||||
break;
|
break;
|
||||||
case CH_THERMO:
|
case CH_THERMO:
|
||||||
Par[0] = st.aslong;
|
Par[0] = st.aslong;
|
||||||
params = 0;
|
params = 0;
|
||||||
SendCmd(CMD_ON); // Just ON (switch)
|
if (send) SendCmd(CMD_ON); // Just ON (switch)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SendCmd(cmd); // Just send ON
|
if (send) SendCmd(cmd); // Just send ON
|
||||||
}//itemtype
|
}//itemtype
|
||||||
else {// Default settings
|
else {// Default settings
|
||||||
Serial.print(st.aslong);
|
Serial.print(st.aslong);
|
||||||
@@ -325,7 +325,7 @@ int Item::Ctrl(short cmd, short n, int *Par, boolean send) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
setCmd(cmd);
|
if (send) setCmd(cmd);
|
||||||
} else { //Double ON - apply special preset - clean white full power
|
} else { //Double ON - apply special preset - clean white full power
|
||||||
switch (itemType) {
|
switch (itemType) {
|
||||||
case CH_RGBW:
|
case CH_RGBW:
|
||||||
@@ -341,7 +341,7 @@ int Item::Ctrl(short cmd, short n, int *Par, boolean send) {
|
|||||||
setVal(st.aslong);
|
setVal(st.aslong);
|
||||||
|
|
||||||
//Send to OH
|
//Send to OH
|
||||||
SendCmd(0, 3, Par);
|
if (send) SendCmd(0, 3, Par);
|
||||||
break;
|
break;
|
||||||
} //itemtype
|
} //itemtype
|
||||||
} //else
|
} //else
|
||||||
@@ -359,7 +359,7 @@ int Item::Ctrl(short cmd, short n, int *Par, boolean send) {
|
|||||||
Par[1] = 0;
|
Par[1] = 0;
|
||||||
Par[2] = 0;
|
Par[2] = 0;
|
||||||
setCmd(cmd);
|
setCmd(cmd);
|
||||||
SendCmd(cmd);
|
if (send) SendCmd(cmd); ///?
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -370,7 +370,7 @@ int Item::Ctrl(short cmd, short n, int *Par, boolean send) {
|
|||||||
Par[1] = 0;
|
Par[1] = 0;
|
||||||
Par[2] = 0;
|
Par[2] = 0;
|
||||||
setCmd(cmd);
|
setCmd(cmd);
|
||||||
SendCmd(CMD_OFF);
|
SendCmd(CMD_OFF); //HALT to OFF mapping - send in any cases
|
||||||
Serial.println(F(" Halted"));
|
Serial.println(F(" Halted"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -770,7 +770,7 @@ int Item::SendCmd(short cmd, short n, int *Par) {
|
|||||||
Serial.print(addrstr);
|
Serial.print(addrstr);
|
||||||
Serial.print(F("->"));
|
Serial.print(F("->"));
|
||||||
Serial.println(valstr);
|
Serial.println(valstr);
|
||||||
mqttClient.publish(addrstr, valstr);
|
mqttClient.publish(addrstr, valstr,true);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ class Item
|
|||||||
Item(char * name);
|
Item(char * name);
|
||||||
Item(aJsonObject * obj);
|
Item(aJsonObject * obj);
|
||||||
boolean isValid ();
|
boolean isValid ();
|
||||||
virtual int Ctrl(short cmd, short n=0, int * Par=NULL, boolean send=false);
|
virtual int Ctrl(short cmd, short n=0, int * Par=NULL, boolean send=true);
|
||||||
int getArg(short n=0);
|
int getArg(short n=0);
|
||||||
boolean getEnableCMD(int delta);
|
boolean getEnableCMD(int delta);
|
||||||
//int getVal(short n); //From VAL array. Negative if no array
|
//int getVal(short n); //From VAL array. Negative if no array
|
||||||
|
|||||||
@@ -149,11 +149,6 @@ EthernetClient ethClient;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PIO_SRC_REV
|
|
||||||
#define PIO_SRC_REV v0.98
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
#include "inputs.h"
|
#include "inputs.h"
|
||||||
|
|
||||||
@@ -173,13 +168,10 @@ extern Artnet *artnet;
|
|||||||
#define GIST 2
|
#define GIST 2
|
||||||
//#define serverip "192.168.88.2"
|
//#define serverip "192.168.88.2"
|
||||||
//IPAddress server(192, 168, 88, 2); //TODO - configure it
|
//IPAddress server(192, 168, 88, 2); //TODO - configure it
|
||||||
//char* inprefix=("/myhome/in/");
|
|
||||||
//char* outprefix=("/myhome/s_out/");
|
|
||||||
//char* subprefix=("/myhome/in/#");
|
|
||||||
|
|
||||||
#define inprefix "/myhome/in/"
|
//const char inprefix[] PROGMEM = "/myhome/in/"
|
||||||
const char outprefix[] PROGMEM = "/myhome/s_out/";
|
const char outprefix[] PROGMEM = OUTTOPIC;
|
||||||
#define subprefix "/myhome/in/#"
|
const char inprefix[] PROGMEM = INTOPIC;
|
||||||
|
|
||||||
aJsonObject *root = NULL;
|
aJsonObject *root = NULL;
|
||||||
aJsonObject *items = NULL;
|
aJsonObject *items = NULL;
|
||||||
@@ -213,30 +205,43 @@ PubSubClient mqttClient(ethClient);
|
|||||||
void watchdogSetup(void) {} //Do not remove - strong re-definition WDT Init for DUE
|
void watchdogSetup(void) {} //Do not remove - strong re-definition WDT Init for DUE
|
||||||
|
|
||||||
// MQTT Callback routine
|
// MQTT Callback routine
|
||||||
|
#define sublen 20
|
||||||
|
#define topiclen 20
|
||||||
void callback(char *topic, byte *payload, unsigned int length) {
|
void callback(char *topic, byte *payload, unsigned int length) {
|
||||||
payload[length] = 0;
|
payload[length] = 0;
|
||||||
Serial.print(F("\n["));
|
Serial.print(F("\n["));
|
||||||
Serial.print(topic);
|
Serial.print(topic);
|
||||||
Serial.print("] ");
|
Serial.print(F("] "));
|
||||||
|
|
||||||
int fr = freeRam();
|
int fr = freeRam();
|
||||||
if (fr < 250) {
|
if (fr < 250) {
|
||||||
Serial.println(F("OOM!"));
|
Serial.println(F("OOM!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define sublen 20
|
|
||||||
char subtopic[sublen] = "";
|
|
||||||
int cmd = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
Serial.print((char) payload[i]);
|
Serial.print((char) payload[i]);
|
||||||
}
|
}
|
||||||
Serial.println();
|
Serial.println();
|
||||||
|
|
||||||
// short intopic = strncmp(topic,F(inprefix),strlen(inprefix));
|
boolean retaining = (lanStatus == 4); //Todo - named constant
|
||||||
// short outtopic = strncmp(topic,F(outprefix),strlen(outprefix));
|
//Check if topic = Command topic
|
||||||
|
short intopic=0;
|
||||||
|
{
|
||||||
|
char buf[topiclen+1];
|
||||||
|
strncpy_P(buf,inprefix,sizeof(buf));
|
||||||
|
intopic = strncmp(topic,buf,strlen(inprefix));
|
||||||
|
}
|
||||||
|
|
||||||
|
// in Retaining status - trying to restore previous state from retained output topic. Retained input topics are not relevant.
|
||||||
|
if (retaining && !intopic) {
|
||||||
|
Serial.println(F("Skipping.."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
char subtopic[sublen] = "";
|
||||||
|
int cmd = 0;
|
||||||
|
|
||||||
cmd = txt2cmd((char *) payload);
|
cmd = txt2cmd((char *) payload);
|
||||||
char *t;
|
char *t;
|
||||||
if (t = strrchr(topic, '/')) strncpy(subtopic, t + 1, sublen - 1);
|
if (t = strrchr(topic, '/')) strncpy(subtopic, t + 1, sublen - 1);
|
||||||
@@ -270,7 +275,7 @@ void callback(char *topic, byte *payload, unsigned int length) {
|
|||||||
while (payload && i < 3)
|
while (payload && i < 3)
|
||||||
Par[i++] = getInt((char **) &payload);
|
Par[i++] = getInt((char **) &payload);
|
||||||
|
|
||||||
item.Ctrl(0, i, Par);
|
item.Ctrl(0, i, Par, !retaining);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -280,13 +285,13 @@ void callback(char *topic, byte *payload, unsigned int length) {
|
|||||||
|
|
||||||
case CMD_ON:
|
case CMD_ON:
|
||||||
|
|
||||||
if (item.getEnableCMD(500))
|
if (item.getEnableCMD(500) || lanStatus == 4)
|
||||||
item.Ctrl(cmd); //Accept ON command not earlier then 500 ms after set settings (Homekit hack)
|
item.Ctrl(cmd, 0, NULL, !retaining); //Accept ON command not earlier then 500 ms after set settings (Homekit hack)
|
||||||
else Serial.println("on Skipped");
|
else Serial.println("on Skipped");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default: //some known command
|
default: //some known command
|
||||||
item.Ctrl(cmd);
|
item.Ctrl(cmd, 0, NULL, !retaining);
|
||||||
|
|
||||||
} //ctrl
|
} //ctrl
|
||||||
} //valid json
|
} //valid json
|
||||||
@@ -320,7 +325,7 @@ void printMACAddress() {
|
|||||||
|
|
||||||
void restoreState() {
|
void restoreState() {
|
||||||
// Once connected, publish an announcement... // Once connected, publish an announcement...
|
// Once connected, publish an announcement... // Once connected, publish an announcement...
|
||||||
mqttClient.publish("/myhome/out/RestoreState", "ON");
|
//mqttClient.publish("/myhome/out/RestoreState", "ON");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -397,13 +402,23 @@ if((wifiMulti.run() == WL_CONNECTED)) lanStatus=1;
|
|||||||
Serial.println(client_id);
|
Serial.println(client_id);
|
||||||
|
|
||||||
|
|
||||||
// ... and resubscribe
|
// ... Temporary subscribe to status topic
|
||||||
mqttClient.subscribe(subprefix);
|
char buf[topiclen];
|
||||||
|
|
||||||
|
strncpy_P(buf,outprefix,sizeof(buf));
|
||||||
restoreState();
|
strncat(buf,"#",sizeof(buf));
|
||||||
|
mqttClient.subscribe(buf);
|
||||||
|
|
||||||
|
//Subscribing for command topics
|
||||||
|
strncpy_P(buf,inprefix,sizeof(buf));
|
||||||
|
strncat(buf,"#",sizeof(buf));
|
||||||
|
mqttClient.subscribe(buf);
|
||||||
|
|
||||||
|
//restoreState();
|
||||||
// if (_once) {DMXput(); _once=0;}
|
// if (_once) {DMXput(); _once=0;}
|
||||||
lanStatus = 3;
|
lanStatus = 4;
|
||||||
|
lanCheck = millis() + 5000;
|
||||||
|
Serial.println(F("Awaiting for retained topics"));
|
||||||
} else {
|
} else {
|
||||||
Serial.print(F("failed, rc="));
|
Serial.print(F("failed, rc="));
|
||||||
Serial.print(mqttClient.state());
|
Serial.print(mqttClient.state());
|
||||||
@@ -414,6 +429,21 @@ if((wifiMulti.run() == WL_CONNECTED)) lanStatus=1;
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 4: //retaining ... Collecting
|
||||||
|
if (millis() > lanCheck) {
|
||||||
|
char buf[topiclen];
|
||||||
|
|
||||||
|
//Unsubscribe from status topics..
|
||||||
|
strncpy_P(buf,outprefix,sizeof(buf));
|
||||||
|
strncat(buf,"#",sizeof(buf));
|
||||||
|
mqttClient.unsubscribe(buf);
|
||||||
|
|
||||||
|
lanStatus = 3;
|
||||||
|
Serial.println(F("Accepting commands..."));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 3: //operation
|
case 3: //operation
|
||||||
if (!mqttClient.connected()) lanStatus = 2;
|
if (!mqttClient.connected()) lanStatus = 2;
|
||||||
break;
|
break;
|
||||||
@@ -505,7 +535,7 @@ void Changed(int i, DeviceAddress addr, int val) {
|
|||||||
if (owEmit) {
|
if (owEmit) {
|
||||||
strncpy(addrbuf, owEmit, sizeof(addrbuf));
|
strncpy(addrbuf, owEmit, sizeof(addrbuf));
|
||||||
Serial.print(owEmit);
|
Serial.print(owEmit);
|
||||||
Serial.print("=");
|
Serial.print(F("="));
|
||||||
Serial.println(val);
|
Serial.println(val);
|
||||||
}
|
}
|
||||||
owItem = aJson.getObjectItem(owObj, "item")->valuestring;
|
owItem = aJson.getObjectItem(owObj, "item")->valuestring;
|
||||||
@@ -866,7 +896,7 @@ int getConfig(int arg_cnt, char **args)
|
|||||||
response = htclient.responseBody();
|
response = htclient.responseBody();
|
||||||
htclient.stop();
|
htclient.stop();
|
||||||
wdt_res();
|
wdt_res();
|
||||||
Serial.print("HTTP Status code: ");
|
Serial.print(F("HTTP Status code: "));
|
||||||
Serial.println(responseStatusCode);
|
Serial.println(responseStatusCode);
|
||||||
//Serial.print("GET Response: ");
|
//Serial.print("GET Response: ");
|
||||||
|
|
||||||
@@ -1043,7 +1073,7 @@ void owIdle(void) {
|
|||||||
|
|
||||||
wdt_res();
|
wdt_res();
|
||||||
return;///
|
return;///
|
||||||
Serial.print("o");
|
Serial.print(F("o"));
|
||||||
|
|
||||||
if (lanLoop() == 1) mqttClient.loop();
|
if (lanLoop() == 1) mqttClient.loop();
|
||||||
//if (owReady) owLoop();
|
//if (owReady) owLoop();
|
||||||
|
|||||||
@@ -1,4 +1,16 @@
|
|||||||
// Configuration of drivers enabled
|
// Configuration of drivers enabled
|
||||||
|
#ifndef PIO_SRC_REV
|
||||||
|
#define PIO_SRC_REV v0.99
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef OUTTOPIC
|
||||||
|
#define OUTTOPIC "/myhome/s_out/"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef INTOPIC
|
||||||
|
#define INTOPIC "/myhome/in/"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef DMX_DISABLE
|
#ifndef DMX_DISABLE
|
||||||
#define _dmxin
|
#define _dmxin
|
||||||
#define _dmxout
|
#define _dmxout
|
||||||
@@ -12,7 +24,9 @@
|
|||||||
#define _modbus
|
#define _modbus
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ARTNET_ENABLE
|
||||||
#define _artnet
|
#define _artnet
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(ESP8266)
|
#if defined(ESP8266)
|
||||||
#define __ESP__
|
#define __ESP__
|
||||||
@@ -43,4 +57,4 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define Q(x) #x
|
#define Q(x) #x
|
||||||
#define QUOTE(x) Q(x)
|
#define QUOTE(x) Q(x)
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
[platformio]
|
[platformio]
|
||||||
src_dir = lighthub
|
src_dir = lighthub
|
||||||
env_default =
|
env_default =
|
||||||
; megaatmega2560
|
megaatmega2560
|
||||||
due
|
; due
|
||||||
; esp8266
|
; esp8266
|
||||||
|
|
||||||
[env:due]
|
[env:due]
|
||||||
|
|||||||
Reference in New Issue
Block a user