Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小毕学习代码
arduino-esp32
提交
9e288839
A
arduino-esp32
项目概览
小毕学习代码
/
arduino-esp32
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
arduino-esp32
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9e288839
编写于
11月 19, 2018
作者:
R
Rob de Jonge
提交者:
Me No Dev
11月 19, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added a message for all event types. (#1916)
上级
a4368259
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
78 addition
and
12 deletion
+78
-12
libraries/WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino
...aries/WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino
+78
-12
未找到文件。
libraries/WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino
浏览文件 @
9e288839
...
...
@@ -43,18 +43,84 @@ void WiFiEvent(WiFiEvent_t event)
{
Serial
.
printf
(
"[WiFi-event] event: %d
\n
"
,
event
);
switch
(
event
)
{
switch
(
event
)
{
case
SYSTEM_EVENT_WIFI_READY
:
Serial
.
println
(
"WiFi interface ready"
);
break
;
case
SYSTEM_EVENT_SCAN_DONE
:
Serial
.
println
(
"Completed scan for access points"
);
break
;
case
SYSTEM_EVENT_STA_START
:
Serial
.
println
(
"WiFi client started"
);
break
;
case
SYSTEM_EVENT_STA_STOP
:
Serial
.
println
(
"WiFi clients stopped"
);
break
;
case
SYSTEM_EVENT_STA_CONNECTED
:
Serial
.
println
(
"Connected to access point"
);
break
;
case
SYSTEM_EVENT_STA_DISCONNECTED
:
Serial
.
println
(
"Disconnected from WiFi access point"
);
break
;
case
SYSTEM_EVENT_STA_AUTHMODE_CHANGE
:
Serial
.
println
(
"Authentication mode of access point has changed"
);
break
;
case
SYSTEM_EVENT_STA_GOT_IP
:
Serial
.
println
(
"WiFi connected"
);
Serial
.
println
(
"IP address: "
);
Serial
.
print
(
"Obtained IP address: "
);
Serial
.
println
(
WiFi
.
localIP
());
break
;
case
SYSTEM_EVENT_STA_DISCONNECTED
:
Serial
.
println
(
"WiFi lost connection
"
);
case
SYSTEM_EVENT_STA_LOST_IP
:
Serial
.
println
(
"Lost IP address and IP address is reset to 0
"
);
break
;
}
}
case
SYSTEM_EVENT_STA_WPS_ER_SUCCESS
:
Serial
.
println
(
"WiFi Protected Setup (WPS): succeeded in enrollee mode"
);
break
;
case
SYSTEM_EVENT_STA_WPS_ER_FAILED
:
Serial
.
println
(
"WiFi Protected Setup (WPS): failed in enrollee mode"
);
break
;
case
SYSTEM_EVENT_STA_WPS_ER_TIMEOUT
:
Serial
.
println
(
"WiFi Protected Setup (WPS): timeout in enrollee mode"
);
break
;
case
SYSTEM_EVENT_STA_WPS_ER_PIN
:
Serial
.
println
(
"WiFi Protected Setup (WPS): pin code in enrollee mode"
);
break
;
case
SYSTEM_EVENT_AP_START
:
Serial
.
println
(
"WiFi access point started"
);
break
;
case
SYSTEM_EVENT_AP_STOP
:
Serial
.
println
(
"WiFi access point stopped"
);
break
;
case
SYSTEM_EVENT_AP_STACONNECTED
:
Serial
.
println
(
"Client connected"
);
break
;
case
SYSTEM_EVENT_AP_STADISCONNECTED
:
Serial
.
println
(
"Client disconnected"
);
break
;
case
SYSTEM_EVENT_AP_STAIPASSIGNED
:
Serial
.
println
(
"Assigned IP address to client"
);
break
;
case
SYSTEM_EVENT_AP_PROBEREQRECVED
:
Serial
.
println
(
"Received probe request"
);
break
;
case
SYSTEM_EVENT_GOT_IP6
:
Serial
.
println
(
"IPv6 is preferred"
);
break
;
case
SYSTEM_EVENT_ETH_START
:
Serial
.
println
(
"Ethernet started"
);
break
;
case
SYSTEM_EVENT_ETH_STOP
:
Serial
.
println
(
"Ethernet stopped"
);
break
;
case
SYSTEM_EVENT_ETH_CONNECTED
:
Serial
.
println
(
"Ethernet connected"
);
break
;
case
SYSTEM_EVENT_ETH_DISCONNECTED
:
Serial
.
println
(
"Ethernet disconnected"
);
break
;
case
SYSTEM_EVENT_ETH_GOT_IP
:
Serial
.
println
(
"Obtained IP address"
);
break
;
}}
void
WiFiGotIP
(
WiFiEvent_t
event
,
WiFiEventInfo_t
info
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录