What does it mean value of %iswifi% system variable?
In my case it shows "7".
Does it mean that if value is grater then "0" that mean that WiFi is connected and when equal "0" disconnected?
Value of %iswifi% variable
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 531
- Joined: 07 Jun 2018, 06:47
- Location: Gdynia/Poland
Re: Value of %iswifi% variable
Yes and no
It is a set of bits.
These are the bit positions (taken from WiFiEventData.cpp)
Thus:
0 = disconnected
1 = Connected
3 = Got IP && Connected
7 = Got IP && Connected && Completed to set all flags WiFi is initialized.
Other values can occur, but shouldn't. (at least not for long)
It is a set of bits.
These are the bit positions (taken from WiFiEventData.cpp)
Code: Select all
#define ESPEASY_WIFI_CONNECTED 0
#define ESPEASY_WIFI_GOT_IP 1
#define ESPEASY_WIFI_SERVICES_INITIALIZED 2
0 = disconnected
1 = Connected
3 = Got IP && Connected
7 = Got IP && Connected && Completed to set all flags WiFi is initialized.
Other values can occur, but shouldn't. (at least not for long)
-
- Normal user
- Posts: 531
- Joined: 07 Jun 2018, 06:47
- Location: Gdynia/Poland
Re: Value of %iswifi% variable
THX. Clear for me !
Who is online
Users browsing this forum: Ahrefs [Bot] and 83 guests