mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
lan init delay
This commit is contained in:
@@ -143,8 +143,9 @@ platformio device monitor -b 115200
|
||||
* MODBUS_DISABLE // disable Modbus support
|
||||
* OWIRE_DISABLE // disable OneWire support
|
||||
* ARTNET_ENABLE //Enable Artnet protocol support
|
||||
* DAVR_DMXOUT_PIN=18 // Set Pin for DMXOUT on megaatmega2560
|
||||
* AVR_DMXOUT_PIN=18 // Set Pin for DMXOUT on megaatmega2560
|
||||
* CONTROLLINO //Change Modbus port, direction pins and Wiznet SS pins to be working on [Controllino](http://controllino.biz/)
|
||||
* LAN_INIT_DELAY=2000 // set lan init delay for Wiznet ethernet shield
|
||||
|
||||
|
||||
|
||||
@@ -161,6 +162,7 @@ platformio device monitor -b 115200
|
||||
* Modbus support enabled
|
||||
* OneWire support enabled
|
||||
* Artnet disabled
|
||||
* LAN_INIT_DELAY=0
|
||||
* Defailt MQTT input topic: /myhome/in
|
||||
* Default MQTT topic to publish device status: /myhome/s_out
|
||||
* Default Alarm output topic /alarm
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
# nano my_build_flags.sh
|
||||
# and source it
|
||||
# source my_build_flags.sh
|
||||
echo "\n==============================================Custom build flags are:=====================================================\n"
|
||||
echo "==============================================Custom build flags are:====================================================="
|
||||
export FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
|
||||
export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
|
||||
export FLAGS="$FLAGS -DUSE_1W_PIN=12"
|
||||
@@ -19,8 +19,9 @@
|
||||
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 PLATFORMIO_BUILD_FLAGS="$FLAGS"
|
||||
echo PLATFORMIO_BUILD_FLAGS=$PLATFORMIO_BUILD_FLAGS
|
||||
echo "\n==============================================Custom build flags END=====================================================\n"
|
||||
echo "==============================================Custom build flags END====================================================="
|
||||
unset FLAGS
|
||||
@@ -279,6 +279,7 @@ if((wifiMulti.run() == WL_CONNECTED)) lanStatus=1;
|
||||
IPAddress gw;
|
||||
IPAddress mask;
|
||||
int res = 1;
|
||||
delay(LAN_INIT_DELAY);//for LAN-shield initializing
|
||||
Serial.println(F("Starting lan"));
|
||||
if (loadFlash(OFFSET_IP,ip))
|
||||
if (loadFlash(OFFSET_DNS,dns))
|
||||
@@ -297,7 +298,8 @@ if((wifiMulti.run() == WL_CONNECTED)) lanStatus=1;
|
||||
|
||||
|
||||
if (res == 0) {
|
||||
Serial.println(F("Failed to configure Ethernet using DHCP"));
|
||||
Serial.println(F("Failed to configure Ethernet using DHCP. You can set ip manually!"));
|
||||
Serial.print(F("'ip [ip[,dns[,gw[,subnet]]]]' - set static IP\n"));
|
||||
lanStatus = -10;
|
||||
lanCheck = millis() + 60000;
|
||||
} else {
|
||||
|
||||
@@ -81,6 +81,10 @@
|
||||
#define _artnet
|
||||
#endif
|
||||
|
||||
#ifndef LAN_INIT_DELAY
|
||||
#define LAN_INIT_DELAY 0
|
||||
#endif
|
||||
|
||||
#if defined(ESP8266)
|
||||
#define __ESP__
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user