mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
Fix for W5100 ethernet shield which does not report as the W5200 or W5500
This commit is contained in:
parent
4bfd4b1a12
commit
df6c511d1d
|
@ -36,13 +36,13 @@ EthernetInterface * EthernetInterface::singleton=NULL;
|
|||
*/
|
||||
void EthernetInterface::setup()
|
||||
{
|
||||
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
||||
if (singleton!=NULL)
|
||||
DIAG(F("Prog Error!"));
|
||||
} else {
|
||||
singleton=new EthernetInterface();
|
||||
}
|
||||
DIAG(F("Ethernet shield %sfound"), singleton==NULL ? "not " : "");
|
||||
if (Ethernet.hardwareStatus() == EthernetNoHardware)
|
||||
DIAG(F("Ethernet shield not detected or is a W5100"));
|
||||
if (singleton!=NULL)
|
||||
DIAG(F("Prog Error!"));
|
||||
if (singleton=new EthernetInterface())
|
||||
return;
|
||||
DIAG(F("Ethernet not initialized"));
|
||||
};
|
||||
|
||||
|
||||
|
@ -111,7 +111,7 @@ void EthernetInterface::loop() {
|
|||
* @return true when cable is connected, false otherwise
|
||||
*/
|
||||
bool EthernetInterface::checkLink() {
|
||||
if (Ethernet.linkStatus() == LinkON) {
|
||||
if (Ethernet.linkStatus() != LinkOFF) { // check for not linkOFF instead of linkON as the W5100 does return LinkUnknown
|
||||
//if we are not connected yet, setup a new server
|
||||
if(!connected) {
|
||||
DIAG(F("Ethernet cable connected"));
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
#include "StringFormatter.h"
|
||||
|
||||
#define VERSION "4.1.1"
|
||||
#define VERSION "4.1.2"
|
||||
// 4.2.1 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>)
|
||||
// Bugfix: </> command signal status of EX-RAIL tasks or threads
|
||||
|
|
Loading…
Reference in New Issue
Block a user