瀏覽代碼

1.帧头变为A2,生成日期更新为20221110;

libo 2 年之前
父節點
當前提交
e7ecfcb983
共有 3 個文件被更改,包括 9 次插入7 次删除
  1. 1 1
      Src/KeySlave485.c
  2. 7 5
      Src/TerminalSlave485_jt808.c
  3. 1 1
      Src/freertos.c

+ 1 - 1
Src/KeySlave485.c

@@ -38,7 +38,7 @@ uint8_t product_code[20] = "JL-SIMS-CJ-V2.1";				 //
 uint8_t product_ID[20] = "20210730001";						 //产品ID
 
 char Version_software[30] = "KZB09A0_20220210_Temp1";
-uint32_t Version_Soft[8] = {2,2,3,13,1,1,0,20221101};
+uint32_t Version_Soft[8] = {2,2,3,13,1,1,0,20221110};
 
 uint8_t flag_exitReset = 0;	 //终止复位命令
 uint8_t flag_Uart4_Busy = 0; //表明打印机占用了总线,暂停语音播报

+ 7 - 5
Src/TerminalSlave485_jt808.c

@@ -9,6 +9,8 @@
 
 #define  APP_TERMINALSLAVE485_JT808_USE
 
+#define  JT808_FRAM_HEAD_ID 		0xA2
+
 #ifdef APP_TERMINALSLAVE485_JT808_USE
 /* Includes-----------------------------------------------------------------------------------*/
 #include "TerminalSlave485.h"
@@ -117,7 +119,7 @@ void mem_swap(uint8_t *des,int len)
  * 返回: 构建数据的字节总数
  ***************************************
  */
-int jt808_Build_A1_Cmd(uint8_t *pBuf, uint32_t flowID, uint8_t *pEmergencyflag)
+int jt808_Build_Ax_Cmd(uint8_t *pBuf, uint32_t flowID, uint8_t *pEmergencyflag)
 {
 	int send_pos=0;
 	unsigned char emergencyflag=0;
@@ -129,7 +131,7 @@ int jt808_Build_A1_Cmd(uint8_t *pBuf, uint32_t flowID, uint8_t *pEmergencyflag)
 	UNUSED(temp_i);
 	jt808_update_0x40_data();
 	//标识头	总长度	紧急上报位	数据状态	仓数
-	pBuf[send_pos++] = 0xA1;
+	pBuf[send_pos++] = JT808_FRAM_HEAD_ID;
 	pBuf[send_pos++] = 120;
 	if(StoreNumber>0)
 	{
@@ -767,8 +769,8 @@ void jt808_DoInternalSensorScanAndPost(void)
 				pSendBuf += xlen;
 			    ylen += xlen;
 				break;
-			case 0xA1:
-				xlen = jt808_Build_A1_Cmd(pSendBuf, jt808_obj.flowID, emergencyflag?NULL:&emergencyflag); 
+			case JT808_FRAM_HEAD_ID:
+				xlen = jt808_Build_Ax_Cmd(pSendBuf, jt808_obj.flowID, emergencyflag?NULL:&emergencyflag); 
 				pSendBuf += xlen;
 			    ylen += xlen;
 				break;
@@ -864,7 +866,7 @@ void jt808_InitSensorScanParam(void)
 		Pass41SensorScanParam.step = 5;
 		Pass41SensorScanParam.nstep = 6;
 		Pass41SensorScanParam.cmd_num = 1;
-		Pass41SensorScanParam.cmd_arr[0] = 0xA1;
+		Pass41SensorScanParam.cmd_arr[0] = JT808_FRAM_HEAD_ID;
 	}
 	//初始化发送序列ID
 	jt808_read_Scan_flowID(&(jt808_obj.flowID));

+ 1 - 1
Src/freertos.c

@@ -69,7 +69,7 @@
 #include "func_record.h"
 #include "Data_deal.h"
 #include "DS1302.h"
-//#include "lib_ringfs_example.h"
+#include "lib_ringfs_example.h"
 #include "DS1302Drv.h"
 #include "usart.h"
 #include <string.h> //memsetº¯Êý