File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,10 @@ void startWebServer()
3333 ntripClientStop (true );
3434 wifiStartAP ();
3535
36+ incomingSettings = (char *)malloc (AP_CONFIG_SETTING_SIZE);
37+
3638 // Clear any garbage from settings array
37- memset (incomingSettings, 0 , sizeof (incomingSettings) );
39+ memset (incomingSettings, 0 , AP_CONFIG_SETTING_SIZE );
3840
3941 ws.onEvent (onWsEvent);
4042 server.addHandler (&ws);
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const int FIRMWARE_VERSION_MAJOR = 2;
2626const int FIRMWARE_VERSION_MINOR = 4 ;
2727
2828#define COMPILE_WIFI // Comment out to remove WiFi functionality
29- // #define COMPILE_AP //Requires WiFi. Comment out to remove Access Point functionality
29+ #define COMPILE_AP // Requires WiFi. Comment out to remove Access Point functionality
3030#define COMPILE_ESPNOW // Requires WiFi. Comment out to remove ESP-Now functionality.
3131#define COMPILE_BT // Comment out to remove Bluetooth functionality
3232#define COMPILE_L_BAND // Comment out to remove L-Band functionality
@@ -159,8 +159,8 @@ LoggingType loggingType = LOGGING_UNKNOWN;
159159
160160#endif
161161
162- char certificateContents[ 2000 ] ; // Holds the contents of the keys prior to MQTT connection
163- char keyContents[ 2000 ] ;
162+ char * certificateContents; // Holds the contents of the keys prior to MQTT connection
163+ char * keyContents;
164164// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
165165
166166// GNSS configuration
@@ -328,7 +328,7 @@ AsyncWebSocket ws("/ws");
328328// Because the incoming string is longer than max len, there are multiple callbacks so we
329329// use a global to combine the incoming
330330#define AP_CONFIG_SETTING_SIZE 5000
331- char incomingSettings[AP_CONFIG_SETTING_SIZE] ;
331+ char * incomingSettings;
332332int incomingSettingsSpot = 0 ;
333333unsigned long timeSinceLastIncomingSetting = 0 ;
334334// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Original file line number Diff line number Diff line change @@ -622,7 +622,7 @@ void updateSystemState()
622622
623623 // Clear buffer
624624 incomingSettingsSpot = 0 ;
625- memset (incomingSettings, 0 , sizeof (incomingSettings) );
625+ memset (incomingSettings, 0 , AP_CONFIG_SETTING_SIZE );
626626 }
627627 }
628628 }
Original file line number Diff line number Diff line change @@ -167,12 +167,12 @@ void wifiStartAP()
167167
168168#ifdef COMPILE_ESPNOW
169169 // Return protocol to default settings (no WIFI_PROTOCOL_LR for ESP NOW)
170- esp_wifi_set_protocol (WIFI_IF_STA , WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
170+ esp_wifi_set_protocol (WIFI_IF_AP , WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
171171#endif
172172
173173 IPAddress local_IP (192 , 168 , 4 , 1 );
174174 IPAddress gateway (192 , 168 , 1 , 1 );
175- IPAddress subnet (255 , 255 , 0 , 0 );
175+ IPAddress subnet (255 , 255 , 255 , 0 );
176176
177177 WiFi.softAPConfig (local_IP, gateway, subnet);
178178 if (WiFi.softAP (" RTK Config" ) == false ) // Must be short enough to fit OLED Width
You can’t perform that action at this time.
0 commit comments