Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CharlesGuo11
Heart-Rate Esp32s3-Box_AED
提交
d568d9bc
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 搜索 >>
提交
d568d9bc
编写于
7月 16, 2022
作者:
CharlesGuo11
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
最新AED(BOX)代码,剩图片传输
上级
af93726f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
8 deletion
+11
-8
main/app/app_player.c
main/app/app_player.c
+2
-7
main/gui/ui_device_ctrl.c
main/gui/ui_device_ctrl.c
+9
-1
未找到文件。
main/app/app_player.c
浏览文件 @
d568d9bc
...
...
@@ -118,15 +118,13 @@ static esp_err_t play_mp3(const char *path)
unsigned
char
*
read_ptr
=
read_buf
;
do
{
/* Process audio event sent from other task */
printf
(
"start
\n
"
);
if
(
pdPASS
==
xQueueReceive
(
audio_event_queue
,
&
audio_event
,
0
))
{
if
(
AUDIO_EVENT_PAUSE
==
audio_event
)
{
printf
(
"start_ok
\n
"
);
g_player_state
=
PLAYER_STATE_PAUSE
;
i2s_zero_dma_buffer
(
I2S_NUM_0
);
xQueuePeek
(
audio_event_queue
,
&
audio_event
,
portMAX_DELAY
);
goto
clean_up
;
//
continue;
//
goto clean_up;
continue
;
}
if
(
AUDIO_EVENT_CHANGE
==
audio_event
||
...
...
@@ -150,7 +148,6 @@ static esp_err_t play_mp3(const char *path)
/* Find MP3 sync word from read buffer */
int
offset
=
MP3FindSyncWord
(
read_buf
,
MAINBUF_SIZE
);
printf
(
"nooooo"
);
if
(
offset
>=
0
)
{
read_ptr
+=
offset
;
/*!< Data start point */
...
...
@@ -160,7 +157,6 @@ static esp_err_t play_mp3(const char *path)
/* Get MP3 frame info and configure I2S clock */
MP3GetLastFrameInfo
(
mp3_decoder
,
&
frame_info
);
printf
(
"not"
);
/* Configure I2S clock if sample rate changed. Always reconfigure at first frame */
if
(
sample_rate
!=
frame_info
.
samprate
||
...
...
@@ -176,7 +172,6 @@ static esp_err_t play_mp3(const char *path)
}
/* Write decoded data to audio decoder */
printf
(
"not ok"
);
size_t
i2s_bytes_written
=
0
;
size_t
output_size
=
frame_info
.
outputSamps
*
nChans
;
i2s_write
(
I2S_NUM_0
,
output
,
output_size
,
&
i2s_bytes_written
,
portMAX_DELAY
);
...
...
main/gui/ui_device_ctrl.c
浏览文件 @
d568d9bc
...
...
@@ -279,6 +279,14 @@ void picture_ctrl_start(void)//heart help -> picture
lv_obj_set_style_text_color
(
lab_btn_text
,
lv_color_make
(
158
,
158
,
158
),
LV_STATE_DEFAULT
);
lv_obj_center
(
lab_btn_text
);
lv_obj_add_event_cb
(
btn_return
,
ui_dev_ctrl_page_return_click_cb
,
LV_EVENT_CLICKED
,
page
);
//return event
//image display
lv_obj_t
*
img
=
lv_img_create
(
page
);
const
char
*
file_name_with_path
=
"S:/spiffs/picture.jpg"
;
if
(
NULL
!=
file_name_with_path
)
{
lv_img_set_src
(
img
,
file_name_with_path
);
lv_obj_align
(
img
,
LV_ALIGN_CENTER
,
80
,
0
);
ESP_LOGI
(
TAG
,
"Display image file : %s"
,
file_name_with_path
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录