diff --git a/CVReader.ino b/CVReader.ino index bbb8189..144d07b 100644 --- a/CVReader.ino +++ b/CVReader.ino @@ -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 diff --git a/Config.h b/Config.h index 9104890..1a495bc 100644 --- a/Config.h +++ b/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. diff --git a/WiThrottle.cpp b/WiThrottle.cpp index fac390b..a5c4335 100644 --- a/WiThrottle.cpp +++ b/WiThrottle.cpp @@ -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);