mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-03-14 10:03:09 +01:00
updated config example
check for MQTT / Ethernet setup
This commit is contained in:
parent
41ed2aeeeb
commit
a33b463c74
@ -404,7 +404,7 @@ bool MQTTInterface::setupNetwork()
|
|||||||
IPAddress ip = Ethernet.localIP(); // reassign the obtained ip address
|
IPAddress ip = Ethernet.localIP(); // reassign the obtained ip address
|
||||||
DIAG(F("IP: %d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]);
|
DIAG(F("IP: %d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]);
|
||||||
DIAG(F("Port:%d"), IP_PORT);
|
DIAG(F("Port:%d"), IP_PORT);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,11 +98,14 @@ The configuration file for DCC-EX Command Station
|
|||||||
// library from <add link here> or get via the libray manager either from the IDE
|
// library from <add link here> or get via the libray manager either from the IDE
|
||||||
// or PIO
|
// or PIO
|
||||||
|
|
||||||
|
// The following is only needed if the Broker requires it. cf broker descriptions below
|
||||||
#define MQTT_USER "your broker user name"
|
#define MQTT_USER "your broker user name"
|
||||||
#define MQTT_PWD "your broker passwd"
|
#define MQTT_PWD "your broker passwd"
|
||||||
#define MQTT_PREFIX "prefix if required by the broker"
|
#define MQTT_PREFIX "prefix if required by the broker"
|
||||||
|
|
||||||
|
// UNCOMMENT THE FOLLOWING LINE TO ENABLE MQTT
|
||||||
// #define ENABLE_MQTT true
|
// #define ENABLE_MQTT true
|
||||||
|
|
||||||
// Set the used broker to one of the configurations from MQTTBrokers.h where some
|
// Set the used broker to one of the configurations from MQTTBrokers.h where some
|
||||||
// public freely avaiable brokers are configured
|
// public freely avaiable brokers are configured
|
||||||
|
|
||||||
|
@ -40,7 +40,11 @@
|
|||||||
|
|
||||||
// MQTT handles ethernet on it's own
|
// MQTT handles ethernet on it's own
|
||||||
#if ENABLE_MQTT && (defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_SAMD_ZERO) || defined(TEENSYDUINO))
|
#if ENABLE_MQTT && (defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_SAMD_ZERO) || defined(TEENSYDUINO))
|
||||||
|
#if ENABLE_ETHERNET
|
||||||
|
#error Ethernet and MQTT can not be enabled simultaneaously
|
||||||
|
#else
|
||||||
#define MQTT_ON true
|
#define MQTT_ON true
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #if WIFI_ON && ETHERNET_ON
|
// #if WIFI_ON && ETHERNET_ON
|
||||||
|
Loading…
Reference in New Issue
Block a user