Fix after merging PR.(DUE and Mega)

This commit is contained in:
2018-10-13 23:03:59 +03:00
parent 87e7bcbd6a
commit 3038e41788
7 changed files with 112 additions and 14 deletions

31
build_flags_due-5500.sh Normal file
View File

@@ -0,0 +1,31 @@
#! /bin/bash
# usage:
# first make your own copy of template
# cp build_flags_template.sh build_flags_ENVNAME.sh
# then edit, change or comment something
export FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
#export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
#export FLAGS="$FLAGS -DUSE_1W_PIN=12"
#export FLAGS="$FLAGS -DSD_CARD_INSERTED"
export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
export FLAGS="$FLAGS -DWiz5500"
#export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:ff"
# export FLAGS="$FLAGS -DDMX_DISABLE"
# export FLAGS="$FLAGS -DARTNET_ENABLE"
# export FLAGS="$FLAGS -DMODBUS_DISABLE"
# export FLAGS="$FLAGS -DOWIRE_DISABLE"
# export FLAGS="$FLAGS -DAVR_DMXOUT_PIN=18"
# export FLAGS="$FLAGS -DLAN_INIT_DELAY=2000"
# export FLAGS="$FLAGS -DCONTROLLINO"
# export FLAGS="$FLAGS -DESP_WIFI_AP=MYAP"
# export FLAGS="$FLAGS -DESP_WIFI_PWD=MYPWD"
# export FLAGS="$FLAGS -DWIFI_MANAGER_DISABLE"
# export FLAGS="$FLAGS -DDHT_DISABLE"
# export FLAGS="$FLAGS -DRESET_PIN=5"
# export FLAGS="$FLAGS -DDHCP_RETRY_INTERVAL=60000"
# export FLAGS="$FLAGS -DRESTART_LAN_ON_MQTT_ERRORS"
# export FLAGS="$FLAGS -DW5500_CS_PIN=53"
export FLAGS="$FLAGS -DWITH_STREAMING_LIB"
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
echo $FLAGS

View File

@@ -0,0 +1,31 @@
#! /bin/bash
# usage:
# first make your own copy of template
# cp build_flags_template.sh build_flags_ENVNAME.sh
# then edit, change or comment something
export FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
#export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
#export FLAGS="$FLAGS -DUSE_1W_PIN=12"
#export FLAGS="$FLAGS -DSD_CARD_INSERTED"
export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
#export FLAGS="$FLAGS -DWiz5500"
#export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:fe"
# export FLAGS="$FLAGS -DDMX_DISABLE"
# export FLAGS="$FLAGS -DARTNET_ENABLE"
# export FLAGS="$FLAGS -DMODBUS_DISABLE"
# export FLAGS="$FLAGS -DOWIRE_DISABLE"
# export FLAGS="$FLAGS -DAVR_DMXOUT_PIN=18"
# export FLAGS="$FLAGS -DLAN_INIT_DELAY=2000"
# export FLAGS="$FLAGS -DCONTROLLINO"
# export FLAGS="$FLAGS -DESP_WIFI_AP=MYAP"
# export FLAGS="$FLAGS -DESP_WIFI_PWD=MYPWD"
# export FLAGS="$FLAGS -DWIFI_MANAGER_DISABLE"
export FLAGS="$FLAGS -DDHT_DISABLE"
# export FLAGS="$FLAGS -DRESET_PIN=5"
# export FLAGS="$FLAGS -DDHCP_RETRY_INTERVAL=60000"
# export FLAGS="$FLAGS -DRESTART_LAN_ON_MQTT_ERRORS"
# export FLAGS="$FLAGS -DW5500_CS_PIN=53"
export FLAGS="$FLAGS -DWITH_STREAMING_LIB"
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
echo $FLAGS

30
build_flags_mega2560.sh Normal file
View File

@@ -0,0 +1,30 @@
#! /bin/bash
# usage:
# first make your own copy of template
# cp build_flags_template.sh build_flags_ENVNAME.sh
# then edit, change or comment something
export FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
#export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
#export FLAGS="$FLAGS -DUSE_1W_PIN=12"
#export FLAGS="$FLAGS -DSD_CARD_INSERTED"
export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
#export FLAGS="$FLAGS -DWiz5500"
#export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:ed"
# export FLAGS="$FLAGS -DDMX_DISABLE"
# export FLAGS="$FLAGS -DARTNET_ENABLE"
# export FLAGS="$FLAGS -DMODBUS_DISABLE"
export FLAGS="$FLAGS -DOWIRE_DISABLE"
# export FLAGS="$FLAGS -DAVR_DMXOUT_PIN=18"
# export FLAGS="$FLAGS -DLAN_INIT_DELAY=2000"
# export FLAGS="$FLAGS -DCONTROLLINO"
# export FLAGS="$FLAGS -DESP_WIFI_AP=MYAP"
# export FLAGS="$FLAGS -DESP_WIFI_PWD=MYPWD"
# export FLAGS="$FLAGS -DWIFI_MANAGER_DISABLE"
export FLAGS="$FLAGS -DDHT_DISABLE"
# export FLAGS="$FLAGS -DRESET_PIN=5"
# export FLAGS="$FLAGS -DDHCP_RETRY_INTERVAL=60000"
# export FLAGS="$FLAGS -DRESTART_LAN_ON_MQTT_ERRORS"
# export FLAGS="$FLAGS -DW5500_CS_PIN=53"
export FLAGS="$FLAGS -DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
echo $FLAGS

View File

@@ -937,7 +937,7 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
if (configStream != NULL) { if (configStream != NULL) {
if (responseStatusCode == 200) { if (responseStatusCode == 200) {
debugSerial<<F("got Config")); debugSerial<<F("got Config");
char c; char c;
aJsonFileStream as = aJsonFileStream(configStream); aJsonFileStream as = aJsonFileStream(configStream);
noInterrupts(); noInterrupts();
@@ -948,29 +948,29 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
hclient.closeStream(configStream); // this is very important -- be sure to close the STREAM hclient.closeStream(configStream); // this is very important -- be sure to close the STREAM
if (!root) { if (!root) {
debugSerial<<F("Config parsing failed")); debugSerial<<F("Config parsing failed");
nextLanCheckTime = millis() + 15000; nextLanCheckTime = millis() + 15000;
return READ_RE_CONFIG;//-11; return READ_RE_CONFIG;//-11;
} else { } else {
// char *outstr = aJson.print(root); // char *outstr = aJson.print(root);
// debugSerial<<outstr); // debugSerial<<outstr);
// free(outstr); // free(outstr);
debugSerial<<F("Applying.")); debugSerial<<F("Applying.");
applyConfig(); applyConfig();
} }
} else { } else {
debugSerial<<F("ERROR: Server returned ")); debugSerial<<F("ERROR: Server returned ");
debugSerial<<responseStatusCode); debugSerial<<responseStatusCode;
nextLanCheckTime = millis() + 5000; nextLanCheckTime = millis() + 5000;
return READ_RE_CONFIG;//-11; return READ_RE_CONFIG;//-11;
} }
} else { } else {
debugSerial<<F("failed to connect")); debugSerial<<F("failed to connect");
debugSerial<<F(" try again in 5 seconds")); debugSerial<<F(" try again in 5 seconds");
nextLanCheckTime = millis() + 5000; nextLanCheckTime = millis() + 5000;
return READ_RE_CONFIG;//-11; return READ_RE_CONFIG;//-11;
} }

2
pioenvs.sh Executable file
View File

@@ -0,0 +1,2 @@
#! /bin/bash
echo /tmp/$1/pioenvs

2
piolibdeps.sh Executable file
View File

@@ -0,0 +1,2 @@
#! /bin/bash
echo /tmp/$1/piolibdeps

View File

@@ -13,15 +13,15 @@ env_default =
; megaatmega2560 ; megaatmega2560
; megaatmega2560-net ; megaatmega2560-net
; due ; due
esp8266 ; esp8266
; esp32 ; esp32
; megaatmega2560-5500 ; megaatmega2560-5500
; due-5500 due-5500
; controllino ; controllino
; stm32 ; stm32
build_dir = /tmp/pioenvs ;build_dir = !sh pioenvs.sh ${platformio.env_default}
libdeps_dir = /tmp/piolibdeps ;libdeps_dir = !sh piolibdeps.sh ${platformio.env_default}
[env:esp32] [env:esp32]
platform = espressif32 platform = espressif32
@@ -171,6 +171,8 @@ lib_deps =
FastLED FastLED
Adafruit Unified Sensor Adafruit Unified Sensor
DHT sensor library DHT sensor library
https://github.com/arcao/Syslog.git
Streaming
[env:due-5500] [env:due-5500]
@@ -198,7 +200,7 @@ lib_deps =
Adafruit Unified Sensor Adafruit Unified Sensor
DHT sensor library DHT sensor library
https://github.com/arcao/Syslog.git https://github.com/arcao/Syslog.git
; Streaming Streaming
; PrintEx ; PrintEx
https://github.com/livello/PrintEx.git#is-select-redecl https://github.com/livello/PrintEx.git#is-select-redecl