/** * @file FluxProtocol.c * @brief 流量计通讯协议部分 * * 用于声明便携制氧机参数 * * @author wang xiang en * @date 2025-04-18 * @version 版本号 * @copyright 版权声明((C)2025, YUWELL MEDTECH Co.ltd) */ #include #include "FluxProtocol.h" #include "esp_log.h" /*记录spirits3的没分钟输出的体积*/ float Spirit3_Volume[4] = { 210,420,630,750}; float Spirit6_Volume[6] = { 210,420,630,840,1050,1200}; float YULite8_Volume[6] = { 210,420,630,840,1050,1200}; /* * @brief 拼接测试过程中用于展示的字符串 * 1.时间设置发送成功 Time setting sent successfully * 2.开始测试 start testing * 3.等待测试结束 Waiting for the end of the test * 4.当前频率测试结束 The current frequency test has ended * 5.所有频率测试完毕,请记录。 All frequency tests have been completed, please record. * 6.设备已启动成功,请开始测试。 Device started successfully, please start testing. */ char *test_info[] = {"Time setting sent successfully!!",\ "start testing....",\ "Waiting for the end of the test...",\ "The current frequency test has ended!!",\ "All frequency tests have been completed!!",\ "Device started successfully!!!!" }; /* 导出协议数据结构体 */ struct FluxProtocol fluxProtocol; /** * @brief 新建用于进行带BS测试的任务函数 * * @param[in] arg not used * */ void bs_test_task(void* arg) { while(1) { vTaskDelay(1000 / portTICK_PERIOD_MS); ESP_LOGI("bs_test_task", "bs_test_task"); vTaskDelay(4000 / portTICK_PERIOD_MS); ESP_LOGI("bs_test_task", "bs_test_task end?"); ESP_LOGI("bs_test_timer_func","hahahahhahah............"); /* 显示测试成功 */ lv_label_set_text(ui_pageHome_labelBSInfo,test_info[3]); vTaskDelay(4000/portTICK_PERIOD_MS); lv_label_set_text(ui_pageHome_labelBSInfo,test_info[4]); vTaskDelay(4000/portTICK_PERIOD_MS); lv_label_set_text(ui_pageHome_labelBSInfo,test_info[5]); vTaskDelay(4000/portTICK_PERIOD_MS); lv_label_set_text(ui_pageHome_labelBSInfo,test_info[1]); vTaskDelay(4000/portTICK_PERIOD_MS); lv_label_set_text(ui_pageHome_labelBSInfo,test_info[2]); ESP_LOGI("bs_test_timer_func","bs_test_timer_func end right"); vTaskDelete(NULL); } }