1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-03-14 18:13:09 +01:00

updated config example

check for MQTT / Ethernet setup
This commit is contained in:
Gregor Baues 2021-05-19 17:21:27 +02:00
parent 41ed2aeeeb
commit a33b463c74
3 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -40,8 +40,12 @@
// 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
// #error Command Station does not support WIFI and ETHERNET at the same time. // #error Command Station does not support WIFI and ETHERNET at the same time.