FluxDC/components/FluxProtocol/FluxProtocol_data.c

78 lines
2.5 KiB
C
Raw Normal View History

2025-04-25 08:19:43 +08:00
/**
* @file FluxProtocol_data.c
* @brief c文件
*
*
*
* @author wang xiang en
* @date 2025-04-24
* @version
* @copyright (C)2025, YUWELL MEDTECH Co.ltd
*/
#include "FluxProtocol.h"
/* 定义用于存储设备名称的数组 */
char *device_name[3] = {
"Spirit3",
"Spirit6",
"YU-Lite8"
};
/* 定义用于存储nominalVolume的数组 单位ml */
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,750,870,990,1110,990};
/* 用于存储三款机器挡位stage的数据 */
int32_t Spirit3_Stage[4] = { 1,2,3,4};
int32_t Spirit6_Stage[6] = { 1,2,3,4,5,6};
int32_t YULite8_Stage[8] = { 1,2,3,4,5,6,7,8};
/*
* @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[5] = {"Time setting Send",\
"testing...",\
"wait for end",\
" frequency test finished",\
"all done",\
};
/* 测试呼吸频率 */
char *test_rate[6] = {"15BPM","20BPM","25BPM","30BPM","35BPM","40BPM"};
/* 用于存储breath_rate的数据 单位bpm */
int32_t breath_rate[6] = {15,20,25,30,35,40};
/* 流量计六个挡位测试时间序列 */
int flux_test_time_series[6] = {40,30,24,20,18,15};
/* 定于用于存储当前测试呼吸频率的枚举变量 */
enum Bs_test_Rate currentTestRate = BS_RATE_15BPM;
/* 定义存储各挡位是否测试成功的标志变量 事件组 */
EventGroupHandle_t g_bs_test_event_group;
/* 定义事件组在的位置 */
uint32_t g_bs_test_event_group_bits[6] = { BIT0,BIT1,BIT2,BIT3,BIT4,BIT5};
/* 创建任务控制句柄 */
TaskHandle_t bs_test_task_handle;
TaskHandle_t nom_test_task_handle;
/* 创建用于表征当前是否进行BS测试的全局变量 */
bool is_bs_test_ing = false;
bool is_nom_test_ing = false;
/* 定义用于存储当前工作模式的变量,默认是bs模式 */
bool is_test_mode_nom = false;
/* 定义控制LED小灯的任务句柄 */
TaskHandle_t bs_stateLED_task_handle;
TaskHandle_t nom_stateLED_task_handle;