|
@@ -237,6 +237,10 @@ static void TcpDataInfoAssembleSend()
|
|
UINT8 BattSendFreq=6;
|
|
UINT8 BattSendFreq=6;
|
|
UINT8 GpsSendFreq=1;
|
|
UINT8 GpsSendFreq=1;
|
|
UINT8 WorkState=0;
|
|
UINT8 WorkState=0;
|
|
|
|
+
|
|
|
|
+ UINT16 year;
|
|
|
|
+ UINT8 month,day,hour,minite,sec;
|
|
|
|
+ UTC8TimeType UTC8TimeTcp;
|
|
static UINT8 WorkFlag=0;
|
|
static UINT8 WorkFlag=0;
|
|
int i = 0;
|
|
int i = 0;
|
|
INT8 len = -1;
|
|
INT8 len = -1;
|
|
@@ -290,9 +294,7 @@ static void TcpDataInfoAssembleSend()
|
|
BattToTcpInfo.encryptMethod = TCP_ENCPT_DISABLE; //not encrypt
|
|
BattToTcpInfo.encryptMethod = TCP_ENCPT_DISABLE; //not encrypt
|
|
BattToTcpInfo.dataLength[0] = (DataLen>>8) & 0xFF;
|
|
BattToTcpInfo.dataLength[0] = (DataLen>>8) & 0xFF;
|
|
BattToTcpInfo.dataLength[1] = DataLen & 0xFF;
|
|
BattToTcpInfo.dataLength[1] = DataLen & 0xFF;
|
|
- UINT16 year;
|
|
|
|
- UINT8 month,day,hour,minite,sec;
|
|
|
|
- UTC8TimeType UTC8TimeTcp;
|
|
|
|
|
|
+
|
|
year=(TimeStracture.UTCtimer1&0xffff0000)>>16;
|
|
year=(TimeStracture.UTCtimer1&0xffff0000)>>16;
|
|
month=(TimeStracture.UTCtimer1&0xff00)>>8;
|
|
month=(TimeStracture.UTCtimer1&0xff00)>>8;
|
|
day=TimeStracture.UTCtimer1&0xff;
|
|
day=TimeStracture.UTCtimer1&0xff;
|
|
@@ -300,7 +302,7 @@ static void TcpDataInfoAssembleSend()
|
|
minite=(TimeStracture.UTCtimer2&0xff0000)>>16;
|
|
minite=(TimeStracture.UTCtimer2&0xff0000)>>16;
|
|
sec=(TimeStracture.UTCtimer2&0xff00)>>8;
|
|
sec=(TimeStracture.UTCtimer2&0xff00)>>8;
|
|
UTCToBeijing((UTC8TimeType *)&UTC8TimeTcp,year,month,day,hour,minite,sec);
|
|
UTCToBeijing((UTC8TimeType *)&UTC8TimeTcp,year,month,day,hour,minite,sec);
|
|
- #ifdef USING_PRINTF
|
|
|
|
|
|
+ #ifdef USING_PRINTF1
|
|
printf("year:%x\n",year);
|
|
printf("year:%x\n",year);
|
|
printf("year:%x,month:%d,day:%d,hour:%d,minute:%d,second:%d\n",UTC8TimeTcp.year,UTC8TimeTcp.month,UTC8TimeTcp.day,UTC8TimeTcp.hour,UTC8TimeTcp.minute,UTC8TimeTcp.second);
|
|
printf("year:%x,month:%d,day:%d,hour:%d,minute:%d,second:%d\n",UTC8TimeTcp.year,UTC8TimeTcp.month,UTC8TimeTcp.day,UTC8TimeTcp.hour,UTC8TimeTcp.minute,UTC8TimeTcp.second);
|
|
#endif
|
|
#endif
|