添加位移监测传感器结构体及解包

This commit is contained in:
2026-05-15 15:15:42 +08:00
parent 942275328c
commit 55a82c6a50
4 changed files with 126 additions and 335 deletions
+14 -5
View File
@@ -99,6 +99,7 @@ typedef enum {
SURFACE_STRESS, //0x0014 表面应力
PRESSURE, //0x0015 压力
MICROWAVE_DISPLACE, //0x0016 微波位移
DISPLACEMENT = 0x0020, //0x0020 位移监测传感器
}SensorType_m;
typedef struct {//主设备固定包头
@@ -124,7 +125,19 @@ typedef struct {
int16_t PitchAngle; //俯仰角偏斜 (范围±900)单位0.1°
int16_t RollAngle; //横滚角偏斜 (范围±900)单位0.1°
int16_t YawAngle; //偏航角偏斜 (范围0~3600)单位0.1°
}__attribute__((packed))LaserTracingType_t;
}__attribute__((packed))LaserTracingType_T;
typedef struct {//0x0020 位移计
int16_t PitchAngle; //俯仰角偏斜(范围±900)单位0.1°
int16_t RollAngle; //横滚角偏斜(范围±900)单位0.1°
int16_t YawAngle; //偏航角偏斜(范围0~3600)单位0.1°
float Altitude; //海拔()单位cm
int16_t Distance; //1轴应力值转位移(范围±300,单位0.1mm)
}__attribute__ ((packed))Displacement_T,*DisplacementDp;
typedef struct {
int Distance;
}__attribute__((packed))LaserDistanceSensorType_t;
typedef struct {
uint8_t CommDevAddr[6]; //通讯单元地址
@@ -134,10 +147,6 @@ typedef struct {
uint8_t ERTime; //紧急上报时长
}__attribute__((packed))SvrDownLPDevConfigPara_t;
typedef struct {
int Distance;
}__attribute__((packed))LaserDistanceSensorType_t;
typedef struct {
uint8_t AlarmType;
uint8_t AlarmState;