mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
move ssid and password to config.h, restore timeout to full value (#5)
* Update WiThrottle.cpp I don't believe the /2 is needed. The clients are already expected to provide a bit of extra time for the heartbeat to occur. EngineDriver targets 90% of the heartbeat. I believe WiThrottle does as well. * move ssid and password into config.h * Revert "move ssid and password into config.h" This reverts commit be96b44e88f8b07ac3193dc88ce219d17fa0b43a. * move ssid and password to config.h
This commit is contained in:
parent
e01b929fd0
commit
9cc8843e15
@ -88,7 +88,7 @@ void setup() {
|
||||
//
|
||||
#ifdef WIFI
|
||||
Serial1.begin(115200);
|
||||
WifiInterface::setup(Serial1, F("BTHub5-M6PT"), F("49de8d4862"),F("DCCEX"),F("CVReader"),3532); // (3532 is 0xDCC decimal... )
|
||||
WifiInterface::setup(Serial1, F(WIFI_CONNECT_TO_SSID), F(WIFI_CONNECT_PASSWORD),F("DCCEX"),F("CVReader"),3532); // (3532 is 0xDCC decimal... )
|
||||
#endif
|
||||
|
||||
// This is just for demonstration purposes
|
||||
|
4
Config.h
4
Config.h
@ -1,8 +1,10 @@
|
||||
#ifndef Config_h
|
||||
#define Config_h
|
||||
|
||||
// Define this if you have a WiFi board on Serial1
|
||||
// Define these if you have a WiFi board on Serial1
|
||||
#define WIFI
|
||||
#define WIFI_CONNECT_TO_SSID "RPi-JMRI"
|
||||
#define WIFI_CONNECT_PASSWORD "rpI-jmri"
|
||||
|
||||
// This hardware configuration would normally be setup using a bunch of #ifdefs.
|
||||
|
||||
|
@ -104,7 +104,7 @@ void WiThrottle::parse(Print & stream, byte * cmdx) {
|
||||
StringFormatter::send(stream,F("VN2.0\nHTDCC++EX\nRL0\nPPA%x\n"),DCCWaveform::mainTrack.getPowerMode()==POWERMODE::ON);
|
||||
if (annotateLeftRight) StringFormatter::send(stream,F("PTT]\\[Turnouts}|{Turnout]\\[Left}|{2]\\[Right}|{4\n"));
|
||||
else StringFormatter::send(stream,F("PTT]\\[Turnouts}|{Turnout]\\[Closed}|{2]\\[Thrown}|{4\n"));
|
||||
StringFormatter::send(stream,F("*%d\n"),HEARTBEAT_TIMEOUT/2);
|
||||
StringFormatter::send(stream,F("*%d\n"),HEARTBEAT_TIMEOUT);
|
||||
break;
|
||||
case 1: // second call... send the turnout table if we have one
|
||||
callState++;
|
||||
@ -156,7 +156,7 @@ void WiThrottle::parse(Print & stream, byte * cmdx) {
|
||||
}
|
||||
break;
|
||||
case 'N': // Heartbeat (2)
|
||||
StringFormatter::send(stream, F("*%d\n"),HEARTBEAT_TIMEOUT/2); // 5 second timeout
|
||||
StringFormatter::send(stream, F("*%d\n"),HEARTBEAT_TIMEOUT); // 10 second timeout
|
||||
break;
|
||||
case 'M': // multithrottle
|
||||
multithrottle(stream, cmd);
|
||||
|
Loading…
Reference in New Issue
Block a user