Skip to content

Commit 040b3de

Browse files
committed
Explicitly set default network type
Fix #360. Limit input to either Ethernet or WiFi, no more NETWORK_TYPE_USE_DEFAULT.
1 parent 2923864 commit 040b3de

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Firmware/RTK_Everywhere/Begin.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,11 @@ void beginSystemState()
10891089
// We should really restructure things so we use online.corrections...
10901090
if (settings.enablePointPerfectCorrections)
10911091
systemState = STATE_KEYS_STARTED;
1092+
1093+
// Explicitly set the default network type to avoid printing 'Hardware default'
1094+
// https://github.com/sparkfun/SparkFun_RTK_Everywhere_Firmware/issues/360
1095+
if(settings.defaultNetworkType == NETWORK_TYPE_USE_DEFAULT)
1096+
settings.defaultNetworkType = NETWORK_TYPE_ETHERNET;
10921097
}
10931098
else if (productVariant == RTK_FACET_MOSAIC)
10941099
{

Firmware/RTK_Everywhere/Ethernet.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void menuEthernet()
116116
{
117117
// Toggle the network type
118118
settings.defaultNetworkType += 1;
119-
if (settings.defaultNetworkType > NETWORK_TYPE_USE_DEFAULT)
119+
if (settings.defaultNetworkType >= NETWORK_TYPE_MAX)
120120
settings.defaultNetworkType = 0;
121121
}
122122
else if (incoming == 'f')

0 commit comments

Comments
 (0)