Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
8332a235
Commit
8332a235
authored
Jan 18, 2018
by
me-no-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issue with STA emiting the wrong event
parent
dde5e297
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
libraries/WiFi/src/WiFiGeneric.cpp
libraries/WiFi/src/WiFiGeneric.cpp
+5
-1
libraries/WiFi/src/WiFiSTA.cpp
libraries/WiFi/src/WiFiSTA.cpp
+1
-1
libraries/WiFi/src/WiFiSTA.h
libraries/WiFi/src/WiFiSTA.h
+1
-1
No files found.
libraries/WiFi/src/WiFiGeneric.cpp
View file @
8332a235
...
...
@@ -313,8 +313,12 @@ esp_err_t WiFiGenericClass::_eventCallback(void *arg, system_event_t *event)
WiFiSTAClass
::
_setStatus
(
WL_DISCONNECTED
);
}
else
if
(
event
->
event_id
==
SYSTEM_EVENT_STA_STOP
)
{
WiFiSTAClass
::
_setStatus
(
WL_NO_SHIELD
);
}
else
if
(
event
->
event_id
==
SYSTEM_EVENT_STA_CONNECTED
)
{
WiFiSTAClass
::
_setStatus
(
WL_IDLE_STATUS
);
}
else
if
(
event
->
event_id
==
SYSTEM_EVENT_STA_GOT_IP
)
{
WiFiSTAClass
::
_setStatus
(
WL_CONNECTED
);
if
(
WiFiSTAClass
::
status
()
==
WL_IDLE_STATUS
)
{
WiFiSTAClass
::
_setStatus
(
WL_CONNECTED
);
}
}
for
(
uint32_t
i
=
0
;
i
<
cbEventList
.
size
();
i
++
)
{
...
...
libraries/WiFi/src/WiFiSTA.cpp
View file @
8332a235
...
...
@@ -358,7 +358,7 @@ uint8_t WiFiSTAClass::waitForConnectResult()
return
WL_DISCONNECTED
;
}
int
i
=
0
;
while
(
status
()
>=
WL_DISCONNECTED
&&
i
++
<
100
)
{
while
(
(
!
status
()
||
status
()
>=
WL_DISCONNECTED
)
&&
i
++
<
100
)
{
delay
(
100
);
}
return
status
();
...
...
libraries/WiFi/src/WiFiSTA.h
View file @
8332a235
...
...
@@ -72,7 +72,7 @@ public:
bool
setHostname
(
const
char
*
hostname
);
// STA WiFi info
wl_status_t
status
();
static
wl_status_t
status
();
String
SSID
()
const
;
String
psk
()
const
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment