Skip to content

Commit 4ea3453

Browse files
author
gemi254
committed
Fix default timeout
1 parent 06bf5f2 commit 4ea3453

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ConfigAssistHelper.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@ class ConfigAssistHelper {
5151
// Check if the time is synchronized
5252
bool isTimeSync();
5353
// Wait for the time synchronization with a timeout
54-
void waitForTimeSync(const uint32_t timeout = 20000);
54+
void waitForTimeSync(uint32_t syncTimeout = 20000);
5555
// Validate the Wi-Fi configuration in the configuration file
5656
bool validateWiFiConfig();
5757
// Set a callback function to handle Wi-Fi result
5858
void setWiFiResultCallback(WiFiResultCallback callback);
5959
// Set the pin number for the LED indicator
6060
void setLedPin(uint8_t pin);
6161
// Set the connection timeout for Wi-Fi
62-
void setConnectionTimeout(uint32_t timeout);
62+
void setConnectionTimeout(uint32_t connectTimeout);
6363
// Set whether to reconnect to Wi-Fi automatically
6464
void setReconnect(bool reconnect);
6565
// Get the current LED state
6666
LEDState getLedState();
6767
// Run the main loop to manage Wi-Fi connection and LED states
6868
void loop();
69-
// Connect to the Wi-Fi network
70-
bool connectToNetwork(uint32_t connectTimeout = 10000, const uint8_t ledPin = 0, const bool async = false);
69+
// Connect to the Wi-Fi network if connectTimeout == 0 default timeout from config or 15000
70+
bool connectToNetwork(uint32_t connectTimeout = 0, const uint8_t ledPin = 0, const bool async = false);
7171
// Connect to the network asynchronously
72-
void connectToNetworkAsync(uint32_t connectTimeout = 10000, const uint8_t ledPin = 0, WiFiResultCallback callback = nullptr);
72+
void connectToNetworkAsync(uint32_t connectTimeout = 0, const uint8_t ledPin = 0, WiFiResultCallback callback = nullptr);
7373
// Start mDNS (Multicast DNS) for the device
7474
bool startMDNS();
7575

@@ -93,7 +93,7 @@ class ConfigAssistHelper {
9393
// Wait for a result from the connection process
9494
void waitForResult();
9595
// Wait for the connection to complete with a timeout
96-
void waitForConnection(uint32_t connectTimeout = 10000);
96+
void waitForConnection(uint32_t connectTimeout = 0);
9797
// Check if the device is still connected to Wi-Fi
9898
// Will try to reconnect or swich to another connection
9999
void checkConnection();

0 commit comments

Comments
 (0)