|
@@ -92,6 +92,9 @@ int jt808_Build_0x6d_Cang_info(uint8_t *pBuf);
|
|
|
int jt808_Build_0x70_Sealing(uint8_t *pBuf);
|
|
|
int jt808_Build_0x71_DumpBox_info(uint8_t *pBuf);
|
|
|
int jt808_Build_0x72_ManHole_Box_info(uint8_t *pBuf);
|
|
|
+int jt808_Build_0x6C_liquid_level(uint8_t *pBuf);
|
|
|
+int jt808_Build_0x73_liquid_air_high(uint8_t *pBuf);
|
|
|
+
|
|
|
|
|
|
void jt808_update_0x40_data(void);
|
|
|
int jt808_BuildSealTxCmd(uint8_t *pBuf, uint8_t *pEmergencyflag); // 40命令
|
|
@@ -214,11 +217,11 @@ int jt808_Build_Ax_Cmd(uint8_t *pBuf, uint32_t flowID, uint8_t *pEmergencyflag)
|
|
|
//64 底阀 开关
|
|
|
send_pos += jt808_Build_0x64_HaiDiFa((uint8_t *)pBuf+send_pos);
|
|
|
|
|
|
- //6D 仓状态
|
|
|
- send_pos += jt808_Build_0x6d_Cang_info((uint8_t *)pBuf+send_pos);
|
|
|
+ //73 液位空高
|
|
|
+ send_pos += jt808_Build_0x73_liquid_air_high((uint8_t *)pBuf+send_pos);
|
|
|
|
|
|
- //70 铅封状态
|
|
|
- send_pos += jt808_Build_0x70_Sealing((uint8_t *)pBuf+send_pos);
|
|
|
+ //6C 液位
|
|
|
+ send_pos += jt808_Build_0x6C_liquid_level((uint8_t *)pBuf+send_pos);
|
|
|
|
|
|
//71 卸油箱门 开关
|
|
|
send_pos += jt808_Build_0x71_DumpBox_info((uint8_t *)pBuf+send_pos);
|
|
@@ -262,6 +265,69 @@ void jt808_update_0x40_data(void)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ ***************************************
|
|
|
+ * 构建73 液位空高模拟量
|
|
|
+ * 输入:pBuf-构建数据的存放首地址
|
|
|
+ * 返回: 构建数据的字节总数
|
|
|
+ ***************************************
|
|
|
+ */
|
|
|
+int jt808_Build_0x73_liquid_air_high(uint8_t *pBuf)
|
|
|
+{
|
|
|
+ int idx=0;
|
|
|
+ int j;
|
|
|
+
|
|
|
+ pBuf[idx++] = 0x73;
|
|
|
+ pBuf[idx++] = 1;
|
|
|
+ for (j = 0; j < StoreNumber; ++j)
|
|
|
+ {
|
|
|
+ uni_float uni_0x93;
|
|
|
+ int k;
|
|
|
+ uni_0x93.flo_Data = ExpansionRatio[j];
|
|
|
+ if(j==0)
|
|
|
+ uni_0x93.flo_Data -= T2C_ALL_Sensor_Data01.MoniLiang_Data_Every_Cang[0];
|
|
|
+ else if(j==1)
|
|
|
+ uni_0x93.flo_Data -= T2C_ALL_Sensor_Data02.MoniLiang_Data_Every_Cang[0];
|
|
|
+ for (k = 0; k < 4; ++k)
|
|
|
+ {
|
|
|
+ pBuf[idx++] = uni_0x93.array_u8[3 - k];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return idx;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ ***************************************
|
|
|
+ * 构建6C 液位模拟量
|
|
|
+ * 输入:pBuf-构建数据的存放首地址
|
|
|
+ * 返回: 构建数据的字节总数
|
|
|
+ ***************************************
|
|
|
+ */
|
|
|
+int jt808_Build_0x6C_liquid_level(uint8_t *pBuf)
|
|
|
+{
|
|
|
+ int idx=0;
|
|
|
+ int j;
|
|
|
+
|
|
|
+ pBuf[idx++] = 0x6C;
|
|
|
+ pBuf[idx++] = 1;
|
|
|
+ for (j = 0; j < StoreNumber; ++j)
|
|
|
+ {
|
|
|
+ uni_float uni_0x93;
|
|
|
+ int k;
|
|
|
+ if(j==0)
|
|
|
+ uni_0x93.flo_Data = T2C_ALL_Sensor_Data01.MoniLiang_Data_Every_Cang[0];
|
|
|
+ else
|
|
|
+ uni_0x93.flo_Data = T2C_ALL_Sensor_Data02.MoniLiang_Data_Every_Cang[0];
|
|
|
+ for (k = 0; k < 4; ++k)
|
|
|
+ {
|
|
|
+ pBuf[idx++] = uni_0x93.array_u8[3 - k];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return idx;
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
***************************************
|