fix: Verbindungs-Timeout im WLAN-Zustandsautomaten
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define NL_WIFI_AP_CLOSE_FALLBACK_MS 10000u
|
||||
#define NL_WIFI_BACKOFF_MIN_MS 1000u
|
||||
#define NL_WIFI_BACKOFF_MAX_MS 60000u
|
||||
#define NL_WIFI_CONNECT_TIMEOUT_MS 30000u /* no event after a connect -> treat as failed */
|
||||
|
||||
typedef enum {
|
||||
NL_WIFI_ST_AP_ONBOARDING = 0,
|
||||
@@ -41,11 +42,13 @@ typedef struct {
|
||||
bool pulsing;
|
||||
bool retry_armed;
|
||||
bool ap_stop_armed;
|
||||
bool awaiting; /* waiting for response to a connect */
|
||||
uint32_t since; /* start of the current connecting phase */
|
||||
uint32_t retry_at;
|
||||
uint32_t backoff;
|
||||
uint32_t deadline; /* onboarding test */
|
||||
uint32_t ap_stop_at;
|
||||
uint32_t connect_at; /* when the pending connect was issued */
|
||||
} nl_wifi_sm_t;
|
||||
|
||||
nl_wifi_actions_t nl_wifi_sm_start(nl_wifi_sm_t *sm, bool have_creds, uint32_t now);
|
||||
|
||||
Reference in New Issue
Block a user