mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 19:59:50 +03:00
Environment nrf52840 [SUCCESS]
Environment esp32 [SUCCESS] Environment due [SUCCESS] Environment megaatmega2560 [SUCCESS] Environment esp8266 [SUCCESS] Environment megaatmega2560-net [SUCCESS] Environment due-5500 [SUCCESS] Environment controllino [SUCCESS] Environment stm32 [SUCCESS]
This commit is contained in:
@@ -671,10 +671,11 @@ int Item::Ctrl(short cmd, short n, int *Parameters, boolean send, int subItemN)
|
|||||||
digitalWrite(iaddr, k = ((cmd == CMD_ON || cmd == CMD_XON) ? HIGH : LOW));
|
digitalWrite(iaddr, k = ((cmd == CMD_ON || cmd == CMD_XON) ? HIGH : LOW));
|
||||||
debugSerial<<F("Pin:")<<iaddr<<F("=")<<k<<endl;
|
debugSerial<<F("Pin:")<<iaddr<<F("=")<<k<<endl;
|
||||||
break;
|
break;
|
||||||
case CH_THERMO:
|
}
|
||||||
///thermoSet(name,cmd,Par1); all cativities done - update temp & cmd
|
case CH_THERMO:
|
||||||
|
///thermoSet(name,cmd,Par1); all activities done - update temp & cmd
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case CH_PWM: {
|
case CH_PWM: {
|
||||||
int k;
|
int k;
|
||||||
short inverse = 0;
|
short inverse = 0;
|
||||||
|
|||||||
@@ -175,25 +175,17 @@ void cleanConf()
|
|||||||
debugSerial<<F("Deleting conf. RAM was:")<<freeRam();
|
debugSerial<<F("Deleting conf. RAM was:")<<freeRam();
|
||||||
aJson.deleteItem(root);
|
aJson.deleteItem(root);
|
||||||
root = NULL;
|
root = NULL;
|
||||||
|
inputs = NULL;
|
||||||
//aJson.deleteItem(inputs);
|
items = NULL;
|
||||||
inputs = NULL;
|
topics = NULL;
|
||||||
//aJson.deleteItem(items);
|
mqttArr = NULL;
|
||||||
items = NULL;
|
#ifdef _dmxout
|
||||||
//aJson.deleteItem(topics);
|
|
||||||
topics = NULL;
|
|
||||||
//aJson.deleteItem(mqttArr);
|
|
||||||
mqttArr = NULL;
|
|
||||||
#ifndef DMX_DISABLE
|
|
||||||
//aJson.deleteItem(dmxArr);
|
|
||||||
dmxArr = NULL;
|
dmxArr = NULL;
|
||||||
#endif
|
#endif
|
||||||
#ifndef OWIRE_DISABLE
|
#ifdef _owire
|
||||||
//aJson.deleteItem(owArr);
|
|
||||||
owArr = NULL;
|
owArr = NULL;
|
||||||
#endif
|
#endif
|
||||||
#ifndef MODBUS_DISABLE
|
#ifndef MODBUS_DISABLE
|
||||||
//aJson.deleteItem(modbusArr);
|
|
||||||
modbusArr = NULL;
|
modbusArr = NULL;
|
||||||
#endif
|
#endif
|
||||||
debugSerial<<F(" is ")<<freeRam()<<endl;
|
debugSerial<<F(" is ")<<freeRam()<<endl;
|
||||||
@@ -1242,7 +1234,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
|
|||||||
//debugSerial<<"GET Response: ");
|
//debugSerial<<"GET Response: ");
|
||||||
|
|
||||||
if (responseStatusCode == 200) {
|
if (responseStatusCode == 200) {
|
||||||
cleanConf()
|
cleanConf();
|
||||||
root = aJson.parse((char *) response.c_str());
|
root = aJson.parse((char *) response.c_str());
|
||||||
|
|
||||||
if (!root) {
|
if (!root) {
|
||||||
@@ -1274,7 +1266,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
|
|||||||
if (httpResponseCode == HTTP_CODE_OK) {
|
if (httpResponseCode == HTTP_CODE_OK) {
|
||||||
String response = httpClient.getString();
|
String response = httpClient.getString();
|
||||||
debugSerial<<response;
|
debugSerial<<response;
|
||||||
cleanConf()
|
cleanConf();
|
||||||
root = aJson.parse((char *) response.c_str());
|
root = aJson.parse((char *) response.c_str());
|
||||||
if (!root) {
|
if (!root) {
|
||||||
debugSerial<<F("Config parsing failed\n");
|
debugSerial<<F("Config parsing failed\n");
|
||||||
|
|||||||
@@ -9,19 +9,18 @@
|
|||||||
; http://docs.platformio.org/page/projectconf.html
|
; http://docs.platformio.org/page/projectconf.html
|
||||||
[platformio]
|
[platformio]
|
||||||
src_dir = lighthub
|
src_dir = lighthub
|
||||||
;env_default = esp8266
|
|
||||||
;monitor_speed = 115200
|
;monitor_speed = 115200
|
||||||
|
;env_default = megaatmega2560-net
|
||||||
; megaatmega2560
|
; megaatmega2560
|
||||||
; megaatmega2560-net
|
; megaatmega2560-net
|
||||||
; due
|
; due
|
||||||
; esp8266
|
; esp8266
|
||||||
; esp32
|
; esp32
|
||||||
; megaatmega2560-5500
|
; megaatmega2560-5500
|
||||||
; due-5500
|
; due-5500
|
||||||
; controllino
|
; controllino
|
||||||
; stm32
|
; stm32
|
||||||
; esp32-evb
|
; nrf52840
|
||||||
; nrf52840_dk
|
|
||||||
|
|
||||||
;build_dir = /tmp/pioenvs
|
;build_dir = /tmp/pioenvs
|
||||||
;libdeps_dir = /tmp/piolibdeps
|
;libdeps_dir = /tmp/piolibdeps
|
||||||
|
|||||||
Reference in New Issue
Block a user