1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

remove things that do not need to be configurable

This commit is contained in:
Harald Barth 2020-09-24 11:59:01 +02:00
parent 9c5396bbc2
commit 10495957dd
2 changed files with 20 additions and 32 deletions

View File

@ -12,6 +12,10 @@
// REFER TO SEPARATE EXAMPLE. // REFER TO SEPARATE EXAMPLE.
//////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////
// This defines the speed at which the Arduino will communicate with the ESP8266 module.
// Currently only Arduino Mega and 115200 is supported.
#define WIFI_SERIAL_LINK_SPEED 115200
#include "config.h" #include "config.h"
#include "DCC.h" #include "DCC.h"
#include "DIAG.h" #include "DIAG.h"
@ -162,7 +166,7 @@ void setup()
const __FlashStringHelper *wifiESSID = F(WIFI_SSID); const __FlashStringHelper *wifiESSID = F(WIFI_SSID);
const __FlashStringHelper *wifiPassword = F(WIFI_PASSWORD); const __FlashStringHelper *wifiPassword = F(WIFI_PASSWORD);
const __FlashStringHelper *dccex = F(WIFI_HOSTNAME); const __FlashStringHelper *dccex = F(WIFI_HOSTNAME);
const uint16_t port = WIFI_PORT; const uint16_t port = IP_PORT;
Serial1.begin(WIFI_SERIAL_LINK_SPEED); Serial1.begin(WIFI_SERIAL_LINK_SPEED);
wifiUp = WifiInterface::setup(Serial1, wifiESSID, wifiPassword, dccex, port); wifiUp = WifiInterface::setup(Serial1, wifiESSID, wifiPassword, dccex, port);

View File

@ -34,32 +34,24 @@ The configuration file for DCC++ EX Command Station
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
// //
// NOTE: Only the Mega currently supports WiFi since space is a constraint on the Uno // The IP port to talk to a WIFI or Ethernet shield.
// at this time. It may be implemented in the future.
//
//
// //
// Enable Use of WiFI for the Command Station for DCC-EX communications #define IP_PORT 2560
#define ENABLE_WIFI false /////////////////////////////////////////////////////////////////////////////////////
//
// NOTE: Only supported on Arduino Mega
// Set to false if you not even want it on the Arduino Mega
//
#define ENABLE_WIFI true
#if ENABLE_WIFI /////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////// //
// // DEFINE WiFi Parameters (only in effect if WIFI is on)
// DEFINE WiFi Parameters //
// #define WIFI_SSID "Your network name"
#define WIFI_SSID "Your network name" #define WIFI_PASSWORD "Your network passwd"
#define WIFI_PASSWORD "Your network passwd" #define WIFI_HOSTNAME "dccex"
#define WIFI_HOSTNAME ""
#define WIFI_PORT 3252
// This defines the speed at which the Arduino will communicate with the ESP8266 module.
// When using the ESP8266 on an Uno it is recommended to use 9600, for Mega2560 the
// higher speed can be used. Set this based on your ESP8266 module configuration.
// Common defaults are 9600 or 115200.
#define WIFI_SERIAL_LINK_SPEED 115200
#endif
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
// //
@ -68,14 +60,6 @@ The configuration file for DCC++ EX Command Station
//#define IP_ADDRESS { 192, 168, 1, 200 } //#define IP_ADDRESS { 192, 168, 1, 200 }
/////////////////////////////////////////////////////////////////////////////////////
//
// DEFINE PORT TO USE FOR ETHERNET COMMUNICATIONS INTERFACE
//
// Uncomment to use Ethernet
// #define ETHERNET_PORT 2560
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
// //
// DEFINE MAC ADDRESS ARRAY FOR ETHERNET COMMUNICATIONS INTERFACE // DEFINE MAC ADDRESS ARRAY FOR ETHERNET COMMUNICATIONS INTERFACE