Commit 924ebb8c authored by 梁百峰's avatar 梁百峰

📃 docs:增加部分注释说明

parent f40121f0
...@@ -347,27 +347,28 @@ void jiancetai_main_task(void) ...@@ -347,27 +347,28 @@ void jiancetai_main_task(void)
} }
if(main_task_10ms % 100 == 0) if(main_task_10ms % 100 == 0)
{ {
//当获取到Mac地址后,且功能开关Switch_indicator为1时,开始搜索WiFi
if(testflag == 1 && Switch_indicator == 1) if(testflag == 1 && Switch_indicator == 1)
{ {
printf("jiancetai_main_task testflag = 1"); printf("jiancetai_main_task testflag = 1");
testflag = 2; testflag = 2;
bt_search_device(); bt_search_device();//开启蓝牙搜索功能
} }
// wifi_demo_example(); // wifi_demo_example();
// printf("Hello World!!!\n"); // printf("Hello World!!!\n");
} }
if(main_task_10ms % 2 == 0) if(main_task_10ms % 2 == 0)
{ {
//当连接成功后修改蓝牙模式
if(click1111 == 1) if(click1111 == 1)
{ {
click1111 = 2; click1111 = 2;
printf("app_mode_change_next"); printf("app_mode_change_next");
app_mode_change_next(); app_mode_change_next();//修改模式
app_default_volume_change_handler(1); app_default_volume_change_handler(1);//设置音量
os_time_dly(20); os_time_dly(20);
wifi_demo_init(); wifi_demo_init();//wifi初始化
} }
// if(click1111 == 0) // if(click1111 == 0)
// { // {
......
...@@ -15,9 +15,10 @@ static void *uart_hdl = NULL; ...@@ -15,9 +15,10 @@ static void *uart_hdl = NULL;
/* 任务相关变量 */ /* 任务相关变量 */
static u8 uart_task_running = 0; static u8 uart_task_running = 0;
uint8_t Yadea_Mac_Addr[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; uint8_t Yadea_Mac_Addr[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};//串口接到的Mac
uint8_t Switch_indicator = 0; uint8_t Switch_indicator = 0; //串口接到的功能开关状态
//串口解析
int Uart_Data_Analysis(u8 *data) int Uart_Data_Analysis(u8 *data)
{ {
if(data[0] == 0x59 && data[1] == 0x44 && data[15] == 0x4B && data[16] == 0x4A) if(data[0] == 0x59 && data[1] == 0x44 && data[15] == 0x4B && data[16] == 0x4A)
......
...@@ -509,6 +509,10 @@ static int a2dp_bt_hci_event_handler(void *evt) ...@@ -509,6 +509,10 @@ static int a2dp_bt_hci_event_handler(void *evt)
switch (event->event) { switch (event->event) {
case HCI_EVENT_DISCONNECTION_COMPLETE: case HCI_EVENT_DISCONNECTION_COMPLETE:
a2dp_play_close(event->args); a2dp_play_close(event->args);
/*在这里,如果仪表处于回连状态,如果在仪表回连状态的时候连接
的话会导致连接失败,库里的逻辑会直接关闭a2dp,没找到在哪里重
新执行连接的逻辑,干脆复位来的痛快。
system_soft_reset();这个就是复位函数*/
system_soft_reset(); system_soft_reset();
break; break;
} }
......
...@@ -104,9 +104,9 @@ uint16_t crc16(uint8_t *puchMsg, uint32_t usDataLen) ...@@ -104,9 +104,9 @@ uint16_t crc16(uint8_t *puchMsg, uint32_t usDataLen)
#define UDP_SEND_INTERVAL 1000 // 发送间隔1秒 #define UDP_SEND_INTERVAL 1000 // 发送间隔1秒
#define UDP_DATA_SIZE 1000 // UDP数据长度1000字节 #define UDP_DATA_SIZE 1000 // UDP数据长度1000字节
#define UDP_PACKET_SIZE 1024 // UDP单包发送大小4K字节 #define UDP_PACKET_SIZE 1024 // UDP单包发送大小4K字节
uint8_t sta_ssid[14]; uint8_t sta_ssid[14]; //wifi名称变量
uint8_t sta_password[24]; uint8_t sta_password[24]; //wifi密码变量
uint8_t wifi_mac[6]; uint8_t wifi_mac[6]; //wifi Mac变量
// WiFi状态标志 // WiFi状态标志
static u8 wifi_initialized = 0; static u8 wifi_initialized = 0;
static u8 wifi_connected = 0; static u8 wifi_connected = 0;
......
JL 检测台工程文件 # JL_Jiancetai 项目说明文档
\ No newline at end of file
## 项目概述
本项目是基于杰理AC792N系列芯片的WiFi投屏与蓝牙音乐工程,用于雅迪检测台检测
## 项目中可以修改的文件
该工程文件在AC792N_SDK_BETA_V3.0.11_2025-12-23\fw-AC792_SDK\sdk\apps\wifi_soundbox中
可修改文件包括:
1. wifi_demo.c // 该文件为WiFi连接与扫描相关函数(修改投屏协议可以在这里修改)
2. wifi_demo.h
3. wifi_analysis.c // 该文件为WiFi参数分析相关函数
4. wifi_analysis.h
5. main.c //Maintask所在处
6. app_uart.c //串口解析
7. app_uart.h
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment