Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CharlesGuo11
Heart-Rate Esp32s3-Box_AED
提交
eef4f77d
H
Heart-Rate Esp32s3-Box_AED
项目概览
CharlesGuo11
/
Heart-Rate Esp32s3-Box_AED
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
H
Heart-Rate Esp32s3-Box_AED
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
eef4f77d
编写于
7月 25, 2022
作者:
CharlesGuo11
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决了看门狗报错问题,点击reset wii即可重新连接
上级
957f41a5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
21 deletion
+19
-21
main/gui/ui_net_config.c
main/gui/ui_net_config.c
+19
-21
未找到文件。
main/gui/ui_net_config.c
浏览文件 @
eef4f77d
...
...
@@ -29,7 +29,7 @@ static void (*g_net_config_end_cb)(void) = NULL;
static
void
nvs_erase
(
void
){
nvs_flash_erase
();
// ESP_LOGI("Wifi is reset, please scan the QR to reconnect the wifi again");
// ESP_LOGI(
TAG,
"Wifi is reset, please scan the QR to reconnect the wifi again");
printf
(
"Wifi is reset, please scan the QR to reconnect the wifi again
\n
"
);
}
...
...
@@ -192,25 +192,23 @@ void ui_net_config_update_cb(ui_net_state_t state, void *args)
lv_img_set_src
(
g_img
,
&
icon_rmaker
);
lv_obj_align
(
g_img
,
LV_ALIGN_CENTER
,
0
,
-
10
);
lv_obj_clear_flag
(
g_hint_lab
,
LV_OBJ_FLAG_HIDDEN
);
// lv_label_set_text_fmt(g_hint_lab, "Device already connected to cloud\n"
// "Wi-Fi is connected to #000000 %s#", ssid);
// lv_obj_align_to(g_hint_lab, g_img, LV_ALIGN_OUT_BOTTOM_MID, 0, 0);
//Create a button to erase the nvs space where the wifi ssid and its password are located
lv_obj_t
*
wifi_reset
=
lv_btn_create
(
g_page
);
lv_obj_set_size
(
wifi_reset
,
LV_SIZE_CONTENT
,
LV_SIZE_CONTENT
);
lv_obj_add_style
(
wifi_reset
,
&
ui_button_styles
()
->
style
,
0
);
lv_obj_add_style
(
wifi_reset
,
&
ui_button_styles
()
->
style_pr
,
LV_STATE_PRESSED
);
lv_obj_add_style
(
wifi_reset
,
&
ui_button_styles
()
->
style_focus
,
LV_STATE_FOCUS_KEY
);
lv_obj_add_style
(
wifi_reset
,
&
ui_button_styles
()
->
style_focus
,
LV_STATE_FOCUSED
);
lv_obj_align_to
(
wifi_reset
,
g_img
,
LV_ALIGN_OUT_BOTTOM_MID
,
-
30
,
10
);
lv_obj_t
*
reset_label
=
lv_label_create
(
wifi_reset
);
lv_label_set_text_static
(
reset_label
,
"Reset WiFi"
);
lv_obj_set_style_text_color
(
reset_label
,
lv_color_make
(
18
,
18
,
18
),
LV_STATE_DEFAULT
);
lv_obj_align
(
reset_label
,
LV_ALIGN_CENTER
,
0
,
0
);
lv_obj_add_event_cb
(
wifi_reset
,
nvs_erase
,
LV_EVENT_CLICKED
,
NULL
);
lv_label_set_text_fmt
(
g_hint_lab
,
"Device already connected to cloud
\n
"
"Wi-Fi is connected to #000000 %s#"
,
ssid
);
lv_obj_align_to
(
g_hint_lab
,
g_img
,
LV_ALIGN_OUT_BOTTOM_MID
,
0
,
0
);
// //Create a button to erase the nvs space where the wifi ssid and its password are located
// lv_obj_t *wifi_reset=lv_btn_create(g_page);
// lv_obj_set_size(wifi_reset, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
// lv_obj_add_style(wifi_reset, &ui_button_styles()->style, 0);
// lv_obj_add_style(wifi_reset, &ui_button_styles()->style_pr, LV_STATE_PRESSED);
// lv_obj_add_style(wifi_reset, &ui_button_styles()->style_focus, LV_STATE_FOCUS_KEY);
// lv_obj_add_style(wifi_reset, &ui_button_styles()->style_focus, LV_STATE_FOCUSED);
// lv_obj_align_to(wifi_reset, g_img,LV_ALIGN_OUT_BOTTOM_MID, -30, 10);
// lv_obj_t *reset_label=lv_label_create(wifi_reset);
// lv_label_set_text_static(reset_label,"Reset WiFi");
// lv_obj_set_style_text_color(reset_label, lv_color_make(18, 18, 18), LV_STATE_DEFAULT);
// lv_obj_align(reset_label, LV_ALIGN_CENTER, 0, 0);
// lv_obj_add_event_cb(wifi_reset, nvs_erase, LV_EVENT_CLICKED, NULL);
}
break
;
default:
...
...
@@ -269,10 +267,10 @@ void ui_net_config_start(void (*fn)(void))
lv_obj_align
(
g_btn_app_hint
,
LV_ALIGN_RIGHT_MID
,
0
,
0
);
lv_obj_t
*
lab_app_inst
=
lv_label_create
(
g_btn_app_hint
);
lv_label_set_text_static
(
lab_app_inst
,
"
To install APP
"
);
lv_label_set_text_static
(
lab_app_inst
,
"
Reset WiFi
"
);
lv_obj_set_style_text_color
(
lab_app_inst
,
lv_color_make
(
18
,
18
,
18
),
LV_STATE_DEFAULT
);
lv_obj_align
(
lab_app_inst
,
LV_ALIGN_CENTER
,
0
,
0
);
lv_obj_add_event_cb
(
g_btn_app_hint
,
ui_net_config_page_app_click_cb
,
LV_EVENT_CLICKED
,
NULL
);
lv_obj_add_event_cb
(
g_btn_app_hint
,
nvs_erase
,
LV_EVENT_CLICKED
,
NULL
);
if
(
ui_get_btn_op_group
())
{
lv_group_add_obj
(
ui_get_btn_op_group
(),
g_btn_app_hint
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录