#ifndef __LEVEL_H #define __LEVEL_H #include "stdint.h" #include "cang.h" #include "stdint.h" #include "string.h" #include "stdio.h" #include "usart.h" #include "config.h" #include "rkg.h" #include "cang.h" #include "kzq.h" #include "level.h" #include "tem.h" #include "angle.h" #include "xyf.h" #include "main.h" #define LEVEL_BUF_DEP 8 #define LEVEL_STARTADDR (0x51) typedef enum{ LEVEL_NONE = 0, LEVEL_CZSS, LEVEL_LDYW, }Level_Type; typedef struct{ float Data; //液位数据 float Avr_temp; float Adot_temp; float Bdot_temp; float Cdot_temp; float Volume_Data; //容积数据 uint16_t ErrorCnt; //液位错误计数 uint16_t Error; //错误状态 uint16_t StateKeepNum; //判断次数 uint16_t RTData_Num; float zero; }Level_Inf; //extern uint16_t Volume_1cang[200]; //extern uint16_t Volume_2cang[200]; //extern uint16_t Volume_3cang[200]; //extern uint16_t Volume_4cang[200]; //extern const uint16_t H_1cang[200]; //extern const uint16_t H_2cang[200]; //extern const uint16_t H_3cang[200]; //extern const uint16_t H_4cang[200]; extern uint8_t USART2_RX_BUF002[Uart2_BUF_SIZE]; extern uint8_t USART1_RX_BUF002[Uart2_BUF_SIZE]; extern uint8_t USART3_RX_BUF002[Uart2_BUF_SIZE]; extern int data_lengthU2,data_lengthU1,data_lengthU3; extern int flagU1Rx,flagU2Rx,flagU3Rx; extern uint8_t USART3_RX_BUF002_print[Uart3_BUF_SIZE]; extern Level_Inf level_inf[SENSOR_DEEP]; extern uint8_t Prase_Level(uint8_t* data, Level_Type type); extern void Level_Error(uint8_t addr); //extern float Calc_Vol(float RadarData,uint16_t* VolArray,const uint16_t* HArray,uint16_t StoreNum); extern Level_Inf level_inf[SENSOR_DEEP]; extern uint16_t Value_Manage(uint8_t Cang_Flag); extern uint16_t GRB_SET_Table(uint8_t* pTx) ; #endif