DCC-EX / CommandStation-EX

EX-CommandStation firmware from DCC-EX. Includes support for WiFi and a standalone WiThrottle server. A complete re-write of the original DCC++.
https://dcc-ex.github.io/
GNU General Public License v3.0
153 stars 103 forks source link

Bug Report: fail to compile when setting static ip-address #318

Closed trainfozz closed 1 year ago

trainfozz commented 1 year ago

Version

Dev 4.2.23

Bug description

Fails to compile when a static ip-address is configured in config.h

Steps to reproduce the bug

  1. Define a static ip-address in config.h
  2. Compile

Expected behaviour

A successful compiling

Screenshots

No response

Hardware in use

Clone Arduino Mega2560 Keystudio W5500 2x motorshiled IBT-2

Additional context

In co-ordination with the team on discord a solution is allready there. The eror is in EthernetInterface.cpp starting at line 138. It says:

ifdef IP_ADDRESS

setLocalIP(IP_ADDRESS); // for static IP, set it again

endif

When compiling the IDE reports the following error: 'setLocalIP(IP_ADDRESS); is not declared in theis scope.

To solve this it should be like this:

ifdef IP_ADDRESS

Ethernet.setLocalIP(IP_ADDRESS); // for static IP, set it again

endif

Hope this can be corrected asap.

habazut commented 1 year ago

commit 45cf610028f9d8fc27ffe4859f148beeb7dd119d Author: Harald Barth haba@kth.se Date: Fri Mar 10 17:49:51 2023 +0100

Bugfix Ethernet shield: Static IP now possible