This commit is contained in:
2018-05-06 17:57:28 +03:00
parent b7331beab4
commit b17d7cfa5a
2 changed files with 18 additions and 9 deletions

View File

@@ -285,10 +285,15 @@ if((wifiMulti.run() == WL_CONNECTED)) lanStatus=1;
else Ethernet.begin(mac,ip,dns,gw);
else Ethernet.begin(mac,ip,dns);
else Ethernet.begin(mac,ip);
else res = Ethernet.begin(mac, 12000);
else
{
wdt_dis();
res = Ethernet.begin(mac, 12000);
wdt_en();
wdt_res();
}
wdt_dis();
if (res == 0) {
Serial.println(F("Failed to configure Ethernet using DHCP"));
lanStatus = -10;
@@ -297,8 +302,7 @@ if((wifiMulti.run() == WL_CONNECTED)) lanStatus=1;
printIPAddress();
lanStatus = 1;
}
wdt_en();
wdt_res();
#endif
break;
@@ -997,7 +1001,11 @@ void setup_main() {
#ifdef _artnet
ArtnetSetup();
#endif
/*
SPI.begin();
while (Ethernet.maintain() == NO_LINK && millis()<3000UL) {delay(500);Serial.print(F("."));}
*/
delay(1000); //Wiz5500
//TODO: checkForRemoteSketchUpdate();
}

View File

@@ -1,6 +1,6 @@
// Configuration of drivers enabled
#ifndef PIO_SRC_REV
#define PIO_SRC_REV v0.997
#define PIO_SRC_REV v0.998
#endif
#define TXEnablePin 13
@@ -20,7 +20,8 @@
#define OFFSET_GW OFFSET_DNS+4
#define OFFSET_MASK OFFSET_GW+4
#define OFFSET_CONFIGSERVER OFFSET_MASK+4
#define EEPROM_offset OFFSET_CONFIGSERVER+32
#define OFFSET_MQTT_PWD OFFSET_CONFIGSERVER+32
#define EEPROM_offset OFFSET_MQTT_PWD+16
#define INTERVAL_CHECK_INPUT 50
#define INTERVAL_CHECK_MODBUS 2000
@@ -46,11 +47,11 @@
#endif
#ifndef OUTTOPIC
#define OUTTOPIC "/myhome/s_out1/"
#define OUTTOPIC "/myhome/s_out/"
#endif
#ifndef INTOPIC
#define INTOPIC "/myhome/in1/"
#define INTOPIC "/myhome/in/"
#endif
#define MQTT_SUBJECT_LENGTH 20