1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-25 05:31:24 +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:
mstevetodd 2020-08-01 12:33:10 -04:00 committed by GitHub
parent e01b929fd0
commit 9cc8843e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -88,7 +88,7 @@ void setup() {
// //
#ifdef WIFI #ifdef WIFI
Serial1.begin(115200); 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 #endif
// This is just for demonstration purposes // This is just for demonstration purposes

View File

@ -1,8 +1,10 @@
#ifndef Config_h #ifndef Config_h
#define 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
#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. // This hardware configuration would normally be setup using a bunch of #ifdefs.

View File

@ -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); 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")); 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")); 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; break;
case 1: // second call... send the turnout table if we have one case 1: // second call... send the turnout table if we have one
callState++; callState++;
@ -156,7 +156,7 @@ void WiThrottle::parse(Print & stream, byte * cmdx) {
} }
break; break;
case 'N': // Heartbeat (2) 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; break;
case 'M': // multithrottle case 'M': // multithrottle
multithrottle(stream, cmd); multithrottle(stream, cmd);