prampec / IotWebConf

ESP8266/ESP32 non-blocking WiFi/AP web configuration Arduino library
MIT License
523 stars 140 forks source link

Improving offline mode #271

Open jajberni opened 1 year ago

jajberni commented 1 year ago

I've been trying to improve the IotWebConf16OffLineMode example by preventing the node from going offline if the user is connected to the AP. This should be possible by reading the ApConnectionState _apConnectionState state variable https://github.com/prampec/IotWebConf/blob/7128981059ba55d84c480e8cf66c03e10276e1fa/src/IotWebConf.h#L599.

Unfortunately, there is no public function exposing this state.

It would be great to add to the IotWebConf.h something like this:

ApConnectionState getApConnectionState () { return this->_apConnectionState; };