mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
Ethernet init order
This commit is contained in:
parent
aca9c9c941
commit
dd309a3705
|
@ -36,11 +36,11 @@ EthernetInterface * EthernetInterface::singleton=NULL;
|
|||
*/
|
||||
void EthernetInterface::setup()
|
||||
{
|
||||
if (Ethernet.hardwareStatus() == EthernetNoHardware)
|
||||
DIAG(F("Ethernet shield not detected or is a W5100"));
|
||||
if (singleton!=NULL)
|
||||
if (singleton!=NULL) {
|
||||
DIAG(F("Prog Error!"));
|
||||
if (singleton=new EthernetInterface())
|
||||
return;
|
||||
}
|
||||
if ((singleton=new EthernetInterface()))
|
||||
return;
|
||||
DIAG(F("Ethernet not initialized"));
|
||||
};
|
||||
|
@ -67,6 +67,16 @@ EthernetInterface::EthernetInterface()
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
if (Ethernet.hardwareStatus() == EthernetNoHardware)
|
||||
DIAG(F("Ethernet shield not detected or is a W5100"));
|
||||
|
||||
unsigned long startmilli = millis();
|
||||
while ((millis() - startmilli) < 5500) { // Loop to give time to check for cable connection
|
||||
if (Ethernet.linkStatus() == LinkON)
|
||||
break;
|
||||
DIAG(F("Ethernet waiting for link (1sec) "));
|
||||
delay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
#include "StringFormatter.h"
|
||||
|
||||
#define VERSION "4.1.2"
|
||||
#define VERSION "4.1.3"
|
||||
// 4.1.3 Bugfix: Ethernet init order
|
||||
// 4.1.2 Bugfix: Ethernet shield W5100 does not report HW or link level
|
||||
// 4.1.1 Bugfix: preserve turnout format
|
||||
// Bugfix: parse multiple commands in one buffer string correctly (ex: <s><Q>)
|
||||
|
|
Loading…
Reference in New Issue
Block a user