Skip to content

Commit 49337f0

Browse files
committed
DCC-EX guessed password changes
When tried to connect to a DCC-EX EX-CommandStation it will now try the 'guessed' password on the first attemp. Then, if it fails to connect, it will ask for the password on the second attempt.
1 parent 95930f5 commit 49337f0

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

WiTcontroller.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ int ssidConnectionState = CONNECTION_STATE_DISCONNECTED;
129129
String ssidPasswordEntered = "";
130130
bool ssidPasswordChanged = true;
131131
char ssidPasswordCurrentChar = ssidPasswordBlankChar;
132+
bool haveTriedGuessedDccexPassword = false;
132133

133134
IPAddress selectedWitServerIP;
134135
int selectedWitServerPort = 0;
@@ -723,11 +724,17 @@ void getSsidPasswordAndWitIpForFound() {
723724

724725
if (!found) {
725726
if ( (selectedSsid.substring(0,6) == "DCCEX_") && (selectedSsid.length()==12) ) {
727+
if (!haveTriedGuessedDccexPassword) {
728+
haveTriedGuessedDccexPassword = true;
726729
selectedSsidPassword = "PASS_" + selectedSsid.substring(6);
730+
debug_println("getSsidPasswordAndWitIpForFound() Using guessed DCC-EX password");
731+
} else {
732+
selectedSsidPassword = "";
733+
debug_println("getSsidPasswordAndWitIpForFound() already tried guessed DCC-EX password. not trying again");
734+
}
727735
witServerIpAndPortEntered = "19216800400102560";
728736
turnoutPrefix = DCC_EX_TURNOUT_PREFIX;
729737
routePrefix = DCC_EX_ROUTE_PREFIX;
730-
debug_println("getSsidPasswordAndWitIpForFound() Using guessed DCC-EX password");
731738
}
732739
}
733740
}

change_log.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Change Log
2+
3+
### V1.108
4+
- When tried to connect to a DCC-EX EX-CommandStation it will now try the 'guessed' password on the first attemp. Then, if it fails to connect, it will ask for the password on the second attempt.
25
### V1.107
36
- Dutch translations by Hans Metselaar
47
### V1.106

static.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const String appVersion = "v1.107";
1+
const String appVersion = "v1.108";
22
#ifndef CUSTOM_APPNAME
33
const String appName = "WiTcontroller";
44
#else

0 commit comments

Comments
 (0)