mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-02-16 22:19:14 +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()
|
void EthernetInterface::setup()
|
||||||
{
|
{
|
||||||
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
if (Ethernet.hardwareStatus() == EthernetNoHardware)
|
||||||
if (singleton!=NULL)
|
DIAG(F("Ethernet shield not detected or is a W5100"));
|
||||||
DIAG(F("Prog Error!"));
|
if (singleton!=NULL)
|
||||||
} else {
|
DIAG(F("Prog Error!"));
|
||||||
singleton=new EthernetInterface();
|
if (singleton=new EthernetInterface())
|
||||||
}
|
return;
|
||||||
DIAG(F("Ethernet shield %sfound"), singleton==NULL ? "not " : "");
|
DIAG(F("Ethernet not initialized"));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ void EthernetInterface::loop() {
|
|||||||
* @return true when cable is connected, false otherwise
|
* @return true when cable is connected, false otherwise
|
||||||
*/
|
*/
|
||||||
bool EthernetInterface::checkLink() {
|
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 we are not connected yet, setup a new server
|
||||||
if(!connected) {
|
if(!connected) {
|
||||||
DIAG(F("Ethernet cable connected"));
|
DIAG(F("Ethernet cable connected"));
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
#include "StringFormatter.h"
|
#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
|
// 4.1.1 Bugfix: preserve turnout format
|
||||||
// Bugfix: parse multiple commands in one buffer string correctly (ex: <s><Q>)
|
// Bugfix: parse multiple commands in one buffer string correctly (ex: <s><Q>)
|
||||||
// Bugfix: </> command signal status of EX-RAIL tasks or threads
|
// Bugfix: </> command signal status of EX-RAIL tasks or threads
|
||||||
|
Loading…
Reference in New Issue
Block a user