Skip to content

Commit 51c2af7

Browse files
committed
Settings: Add new values and RTK_WIFI specific changes
1 parent a167a9a commit 51c2af7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Firmware/RTK_Everywhere/settings.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,12 @@ typedef struct _NTRIP_SERVER_DATA
357357

358358
typedef enum
359359
{
360-
ESPNOW_OFF,
360+
ESPNOW_OFF = 0,
361361
ESPNOW_BROADCASTING,
362362
ESPNOW_PAIRING,
363363
ESPNOW_MAC_RECEIVED,
364364
ESPNOW_PAIRED,
365+
ESPNOW_MAX
365366
} ESPNOWState;
366367
volatile ESPNOWState espnowState = ESPNOW_OFF;
367368

@@ -1932,21 +1933,21 @@ class RTK_WIFI
19321933
WIFI_CHANNEL_t _channel; // Current WiFi channel number
19331934
WIFI_CHANNEL_t _espNowChannel; // Channel required for ESPNow, zero (0) use _channel
19341935
bool _espNowRunning; // ESPNow started or running
1935-
const char * _hostName; // Name of this host
19361936
volatile bool _scanRunning; // Scan running
19371937
bool _softApRunning; // Soft AP is starting or running
19381938
int _staAuthType; // Authorization type for the remote AP
19391939
bool _staConnected; // True when station is connected
19401940
bool _staHasIp; // True when station has IP address
19411941
IPAddress _staIpAddress; // IP address of the station
19421942
uint8_t _staIpType; // 4 or 6 when IP address is assigned
1943-
uint8_t _staMacAddress[6]; // MAC address of the station
1943+
volatile uint8_t _staMacAddress[6]; // MAC address of the station
19441944
const char * _staRemoteApSsid; // SSID of remote AP
19451945
const char * _staRemoteApPassword; // Password of remote AP
19461946
volatile WIFI_ACTION_t _started; // Components that are started and running
19471947
WIFI_CHANNEL_t _stationChannel; // Channel required for station, zero (0) use _channel
19481948
bool _stationRunning; // True while station is starting or running
19491949
uint32_t _timer; // Reconnection timer
1950+
bool _usingDefaultChannel; // Using default WiFi channel
19501951
bool _verbose; // True causes more debug output to be displayed
19511952

19521953
// Display components begin started or stopped
@@ -1985,8 +1986,8 @@ class RTK_WIFI
19851986
// Outputs:
19861987
// Returns true if successful and false upon failure
19871988
bool setWiFiProtocols(wifi_interface_t interface,
1988-
bool enableWiFiProtocols,
1989-
bool enableLongRangeProtocol);
1989+
bool enableWiFiProtocols,
1990+
bool enableLongRangeProtocol);
19901991

19911992
// Handle the soft AP events
19921993
// Inputs:
@@ -2125,6 +2126,11 @@ class RTK_WIFI
21252126
// Returns true if ESP-NOW is being started or is online
21262127
bool espNowRunning();
21272128

2129+
// Set the ESP-NOW channel
2130+
// Inputs:
2131+
// channel: New ESP-NOW channel number
2132+
void espNowSetChannel(WIFI_CHANNEL_t channel);
2133+
21282134
// Handle the WiFi event
21292135
// Inputs:
21302136
// event: Arduino ESP32 event number found on
@@ -2133,16 +2139,10 @@ class RTK_WIFI
21332139
// info: Additional data about the event
21342140
void eventHandler(arduino_event_id_t event, arduino_event_info_t info);
21352141

2136-
// Get the mDNS host name
2142+
// Get the current WiFi channel
21372143
// Outputs:
2138-
// Returns the mDNS host name as a pointer to a zero terminated string
2139-
// of characters
2140-
const char * hostNameGet();
2141-
2142-
// Set the mDNS host name
2143-
// Inputs
2144-
// Address of a zero terminated string containing the mDNS host name
2145-
void hostNameSet(const char * mDnsHostName);
2144+
// Returns the current WiFi channel number
2145+
WIFI_CHANNEL_t getChannel();
21462146

21472147
// Restart WiFi
21482148
// Inputs:

0 commit comments

Comments
 (0)