@@ -253,8 +253,12 @@ class BootWifiEventHandler: public WiFiEventHandler {
253
253
};
254
254
255
255
256
+ /* *
257
+ * Boot WiFi
258
+ */
256
259
void BootWiFi::bootWiFi2 () {
257
260
ESP_LOGD (LOG_TAG, " >> bootWiFi2" );
261
+
258
262
// Check for a GPIO override which occurs when a physical Pin is high
259
263
// during the test. This can force the ability to check for new configuration
260
264
// even if the existing configured access point is available.
@@ -306,17 +310,22 @@ void BootWiFi::setAccessPointCredentials(std::string ssid, std::string password)
306
310
} // setAccessPointCredentials
307
311
308
312
313
+
314
+ /* *
315
+ * @brief Main entry point into booting WiFi
316
+ */
309
317
void BootWiFi::boot () {
310
318
ESP_LOGD (LOG_TAG, " >> boot" );
311
319
ESP_LOGD (LOG_TAG, " +----------+" );
312
320
ESP_LOGD (LOG_TAG, " | BootWiFi |" );
313
321
ESP_LOGD (LOG_TAG, " +----------+" );
314
322
ESP_LOGD (LOG_TAG, " Access point credentials: %s/%s" , m_ssid.c_str (), m_password.c_str ());
315
- m_completeSemaphore.take (" boot" ); // Take the semaphore which will be unlocked when we complete booting.
323
+ m_completeSemaphore.take (" boot" ); // Take the semaphore which will be unlocked when we complete booting.
316
324
bootWiFi2 ();
317
- m_completeSemaphore.wait (" boot" ); // Wait for the semaphore that indicated we have completed booting.
325
+ m_completeSemaphore.wait (" boot" ); // Wait for the semaphore that indicated we have completed booting.
326
+ m_wifi.setWifiEventHandler (nullptr ); // Remove the WiFi boot handler when we have completed booting.
318
327
ESP_LOGD (LOG_TAG, " << boot" );
319
- }
328
+ } // boot
320
329
321
330
BootWiFi::BootWiFi () {
322
331
m_httpServerStarted = false ;
0 commit comments