level.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef __LEVEL_H
  2. #define __LEVEL_H
  3. #include "stdint.h"
  4. #include "cang.h"
  5. #include "stdint.h"
  6. #include "string.h"
  7. #include "stdio.h"
  8. #include "usart.h"
  9. #include "config.h"
  10. #include "rkg.h"
  11. #include "cang.h"
  12. #include "kzq.h"
  13. #include "level.h"
  14. #include "tem.h"
  15. #include "angle.h"
  16. #include "xyf.h"
  17. #include "main.h"
  18. #define LEVEL_BUF_DEP 8
  19. typedef struct{
  20. float Level_Data; //液位数据
  21. float Level_Data1;
  22. float Avr_temp;
  23. float Adot_temp;
  24. float Bdot_temp;
  25. float Cdot_temp;
  26. float Volume_Data; //容积数据
  27. uint16_t Level_ErrorCnt; //液位错误计数
  28. uint16_t Level_Error; //错误状态
  29. uint16_t Level_StateKeepNum; //判断次数
  30. uint16_t RTData_Num;
  31. float Level_Cal_zero;
  32. }Level_Inf;
  33. extern uint16_t Volume_1cang[200];
  34. extern uint16_t Volume_2cang[200];
  35. extern uint16_t Volume_3cang[200];
  36. extern uint16_t Volume_4cang[200];
  37. extern const uint16_t H_1cang[200];
  38. extern const uint16_t H_2cang[200];
  39. extern const uint16_t H_3cang[200];
  40. extern const uint16_t H_4cang[200];
  41. extern uint8_t USART2_RX_BUF002[Uart2_BUF_SIZE];
  42. extern uint8_t USART1_RX_BUF002[Uart2_BUF_SIZE];
  43. extern uint8_t USART3_RX_BUF002[Uart2_BUF_SIZE];
  44. extern int data_lengthU2,data_lengthU1,data_lengthU3;
  45. extern int flagU1Rx,flagU2Rx,flagU3Rx;
  46. extern uint8_t USART3_RX_BUF002_print[Uart3_BUF_SIZE];
  47. extern float Calc_Vol(float RadarData,uint16_t* VolArray,const uint16_t* HArray,uint16_t StoreNum);
  48. extern Level_Inf level_inf[SENSOR_DEEP];
  49. extern uint16_t Value_Manage(uint8_t Cang_Flag);
  50. extern uint16_t GRB_SET_Table(uint8_t* pTx) ;
  51. #endif