From e6c5bb2a1a0d358ed782d1aa6a2c7c72731439f7 Mon Sep 17 00:00:00 2001 From: "Jose A. J. Berni" Date: Wed, 9 Nov 2022 23:04:18 +0100 Subject: [PATCH] Add getApConnectionState Refers to Issue #271 https://github.com/prampec/IotWebConf/issues/271#issue-1442203289 and allows to check if a user is already connected to the AP to prevent powering off. --- src/IotWebConf.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/IotWebConf.h b/src/IotWebConf.h index 2f65e1c..3b9f123 100644 --- a/src/IotWebConf.h +++ b/src/IotWebConf.h @@ -424,6 +424,11 @@ class IotWebConf * Return the current state. */ NetworkState getState() { return this->_state; }; + + /** + * Return the AP connection state to check if there are some user connected + */ + ApConnectionState getApConnectionState () { return this->_apConnectionState; }; /** * This method can be used to set the AP timeout directly without modifying the apTimeoutParameter.