22// Set the ECEF coordinates for a known location
33void menuBase ()
44{
5+ int menuTimeoutExtended = 30 ; // Increase time needed for complex data entry (mount point ID, ECEF coords, etc).
6+
57 while (1 )
68 {
79 Serial.println ();
@@ -76,7 +78,7 @@ void menuBase()
7678
7779 Serial.println (F (" x) Exit" ));
7880
79- int incoming = getNumber (30 ); // Timeout after x seconds
81+ int incoming = getNumber (menuTimeoutExtended ); // Timeout after x seconds
8082
8183 if (incoming == 1 )
8284 {
@@ -93,21 +95,21 @@ void menuBase()
9395 Serial.println (F (" Enter the fixed ECEF coordinates that will be used in Base mode:" ));
9496
9597 Serial.print (F (" ECEF X in meters (ex: -1280182.920): " ));
96- double fixedEcefX = getDouble (menuTimeout ); // Timeout after x seconds
98+ double fixedEcefX = getDouble (menuTimeoutExtended ); // Timeout after x seconds
9799
98100 // Progress with additional prompts only if the user enters valid data
99101 if (fixedEcefX != STATUS_GETNUMBER_TIMEOUT && fixedEcefX != STATUS_PRESSED_X)
100102 {
101103 settings.fixedEcefX = fixedEcefX;
102104
103105 Serial.print (F (" \n ECEF Y in meters (ex: -4716808.5807): " ));
104- double fixedEcefY = getDouble (menuTimeout );
106+ double fixedEcefY = getDouble (menuTimeoutExtended );
105107 if (fixedEcefY != STATUS_GETNUMBER_TIMEOUT && fixedEcefY != STATUS_PRESSED_X)
106108 {
107109 settings.fixedEcefY = fixedEcefY;
108110
109111 Serial.print (F (" \n ECEF Z in meters (ex: 4086669.6393): " ));
110- double fixedEcefZ = getDouble (menuTimeout );
112+ double fixedEcefZ = getDouble (menuTimeoutExtended );
111113 if (fixedEcefZ != STATUS_GETNUMBER_TIMEOUT && fixedEcefZ != STATUS_PRESSED_X)
112114 settings.fixedEcefZ = fixedEcefZ;
113115 }
@@ -118,21 +120,21 @@ void menuBase()
118120 Serial.println (F (" Enter the fixed Lat/Long/Altitude coordinates that will be used in Base mode:" ));
119121
120122 Serial.print (F (" Lat in degrees (ex: 40.090335429): " ));
121- double fixedLat = getDouble (menuTimeout ); // Timeout after x seconds
123+ double fixedLat = getDouble (menuTimeoutExtended ); // Timeout after x seconds
122124
123125 // Progress with additional prompts only if the user enters valid data
124126 if (fixedLat != STATUS_GETNUMBER_TIMEOUT && fixedLat != STATUS_PRESSED_X)
125127 {
126128 settings.fixedLat = fixedLat;
127129
128130 Serial.print (F (" \n Long in degrees (ex: -105.184774720): " ));
129- double fixedLong = getDouble (menuTimeout );
131+ double fixedLong = getDouble (menuTimeoutExtended );
130132 if (fixedLong != STATUS_GETNUMBER_TIMEOUT && fixedLong != STATUS_PRESSED_X)
131133 {
132134 settings.fixedLong = fixedLong;
133135
134136 Serial.print (F (" \n Altitude in meters (ex: 1560.2284): " ));
135- double fixedAltitude = getDouble (menuTimeout );
137+ double fixedAltitude = getDouble (menuTimeoutExtended );
136138 if (fixedAltitude != STATUS_GETNUMBER_TIMEOUT && fixedAltitude != STATUS_PRESSED_X)
137139 settings.fixedAltitude = fixedAltitude;
138140 }
@@ -172,23 +174,23 @@ void menuBase()
172174 else if (incoming == 5 && settings.enableNtripServer == true )
173175 {
174176 Serial.print (F (" Enter local WiFi SSID: " ));
175- readLine (settings.wifiSSID , sizeof (settings.wifiSSID ), menuTimeout );
177+ readLine (settings.wifiSSID , sizeof (settings.wifiSSID ), menuTimeoutExtended );
176178 }
177179 else if (incoming == 6 && settings.enableNtripServer == true )
178180 {
179181 Serial.printf (" Enter password for WiFi network %s: " , settings.wifiSSID );
180- readLine (settings.wifiPW , sizeof (settings.wifiPW ), menuTimeout );
182+ readLine (settings.wifiPW , sizeof (settings.wifiPW ), menuTimeoutExtended );
181183 }
182184 else if (incoming == 7 && settings.enableNtripServer == true )
183185 {
184186 Serial.print (F (" Enter new Caster Address: " ));
185- readLine (settings.casterHost , sizeof (settings.casterHost ), menuTimeout );
187+ readLine (settings.casterHost , sizeof (settings.casterHost ), menuTimeoutExtended );
186188 }
187189 else if (incoming == 8 && settings.enableNtripServer == true )
188190 {
189191 Serial.print (F (" Enter new Caster Port: " ));
190192
191- int casterPort = getNumber (menuTimeout ); // Timeout after x seconds
193+ int casterPort = getNumber (menuTimeoutExtended ); // Timeout after x seconds
192194 if (casterPort < 1 || casterPort > 99999 ) // Arbitrary 99k max port #
193195 Serial.println (F (" Error: Caster Port out of range" ));
194196 else
@@ -197,12 +199,12 @@ void menuBase()
197199 else if (incoming == 9 && settings.enableNtripServer == true )
198200 {
199201 Serial.print (F (" Enter new Mount Point: " ));
200- readLine (settings.mountPoint , sizeof (settings.mountPoint ), menuTimeout );
202+ readLine (settings.mountPoint , sizeof (settings.mountPoint ), menuTimeoutExtended );
201203 }
202204 else if (incoming == 10 && settings.enableNtripServer == true )
203205 {
204206 Serial.printf (" Enter password for Mount Point %s: " , settings.mountPoint );
205- readLine (settings.mountPointPW , sizeof (settings.mountPointPW ), menuTimeout );
207+ readLine (settings.mountPointPW , sizeof (settings.mountPointPW ), menuTimeoutExtended );
206208 }
207209 else if (incoming == STATUS_PRESSED_X)
208210 break ;
0 commit comments