mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
lan init delay
This commit is contained in:
@@ -162,7 +162,7 @@ platformio device monitor -b 115200
|
|||||||
* Modbus support enabled
|
* Modbus support enabled
|
||||||
* OneWire support enabled
|
* OneWire support enabled
|
||||||
* Artnet disabled
|
* Artnet disabled
|
||||||
* LAN_INIT_DELAY=0
|
* LAN_INIT_DELAY=500 //ms
|
||||||
* Defailt MQTT input topic: /myhome/in
|
* Defailt MQTT input topic: /myhome/in
|
||||||
* Default MQTT topic to publish device status: /myhome/s_out
|
* Default MQTT topic to publish device status: /myhome/s_out
|
||||||
* Default Alarm output topic /alarm
|
* Default Alarm output topic /alarm
|
||||||
|
|||||||
@@ -279,7 +279,6 @@ if((wifiMulti.run() == WL_CONNECTED)) lanStatus=1;
|
|||||||
IPAddress gw;
|
IPAddress gw;
|
||||||
IPAddress mask;
|
IPAddress mask;
|
||||||
int res = 1;
|
int res = 1;
|
||||||
delay(LAN_INIT_DELAY);//for LAN-shield initializing
|
|
||||||
Serial.println(F("Starting lan"));
|
Serial.println(F("Starting lan"));
|
||||||
if (loadFlash(OFFSET_IP,ip))
|
if (loadFlash(OFFSET_IP,ip))
|
||||||
if (loadFlash(OFFSET_DNS,dns))
|
if (loadFlash(OFFSET_DNS,dns))
|
||||||
@@ -992,7 +991,6 @@ void postTransmission() {
|
|||||||
digitalWrite(TXEnablePin, 0);
|
digitalWrite(TXEnablePin, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
//#define PIO_SRC_REV commit 8034a6b765229d94a94d90fd08dd9588acf5f3da Author: livello <livello@bk.ru> Date: Wed Mar 28 02:35:50 2018 +0300 refactoring
|
|
||||||
|
|
||||||
void setup_main() {
|
void setup_main() {
|
||||||
setupCmdArduino();
|
setupCmdArduino();
|
||||||
@@ -1007,7 +1005,6 @@ void setup_main() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
setupMacAddress();
|
setupMacAddress();
|
||||||
|
|
||||||
loadConfigFromEEPROM(0, NULL);
|
loadConfigFromEEPROM(0, NULL);
|
||||||
|
|
||||||
#ifdef _modbus
|
#ifdef _modbus
|
||||||
@@ -1021,7 +1018,6 @@ pinMode(TXEnablePin, OUTPUT);
|
|||||||
#endif
|
#endif
|
||||||
modbusSerial.begin(MODBUS_SERIAL_BAUD);
|
modbusSerial.begin(MODBUS_SERIAL_BAUD);
|
||||||
node.idle(&modbusIdle);
|
node.idle(&modbusIdle);
|
||||||
// Callbacks allow us to configure the RS485 transceiver correctly
|
|
||||||
node.preTransmission(preTransmission);
|
node.preTransmission(preTransmission);
|
||||||
node.postTransmission(postTransmission);
|
node.postTransmission(postTransmission);
|
||||||
#endif
|
#endif
|
||||||
@@ -1042,13 +1038,16 @@ pinMode(TXEnablePin, OUTPUT);
|
|||||||
SPI.begin();
|
SPI.begin();
|
||||||
while (Ethernet.maintain() == NO_LINK && millis()<3000UL) {delay(500);Serial.print(F("."));}
|
while (Ethernet.maintain() == NO_LINK && millis()<3000UL) {delay(500);Serial.print(F("."));}
|
||||||
*/
|
*/
|
||||||
delay(500); //Wiz5500
|
delay(LAN_INIT_DELAY);//for LAN-shield initializing
|
||||||
//TODO: checkForRemoteSketchUpdate();
|
//TODO: checkForRemoteSketchUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void printFirmwareVersionAndBuildOptions() {
|
void printFirmwareVersionAndBuildOptions() {
|
||||||
Serial.print(F("\nLazyhome.ru LightHub controller "));
|
Serial.print(F("\nLazyhome.ru LightHub controller "));
|
||||||
Serial.println(F(QUOTE(PIO_SRC_REV)));
|
Serial.println(F(QUOTE(PIO_SRC_REV)));
|
||||||
|
#ifdef CONTROLLINO
|
||||||
|
Serial.println(F("(+)CONTROLLINO"));
|
||||||
|
#endif
|
||||||
#ifdef WATCH_DOG_TICKER_DISABLE
|
#ifdef WATCH_DOG_TICKER_DISABLE
|
||||||
Serial.println(F("(-)WATCHDOG"));
|
Serial.println(F("(-)WATCHDOG"));
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LAN_INIT_DELAY
|
#ifndef LAN_INIT_DELAY
|
||||||
#define LAN_INIT_DELAY 0
|
#define LAN_INIT_DELAY 500
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ESP8266)
|
#if defined(ESP8266)
|
||||||
|
|||||||
Reference in New Issue
Block a user