|
@@ -692,7 +692,7 @@ static void TcpDataInfoRecvHandle()
|
|
AppNVMData.isBattLocked = TRUE;
|
|
AppNVMData.isBattLocked = TRUE;
|
|
tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
}
|
|
}
|
|
- else //0x02代表解锁
|
|
|
|
|
|
+ else if(*(Ptr+31)==0x02) //0x02代表解锁
|
|
{
|
|
{
|
|
AppNVMData.appDataModify = TRUE;
|
|
AppNVMData.appDataModify = TRUE;
|
|
AppNVMData.isBattLocked = FALSE;
|
|
AppNVMData.isBattLocked = FALSE;
|
|
@@ -700,6 +700,52 @@ static void TcpDataInfoRecvHandle()
|
|
}
|
|
}
|
|
TcpService=0x00;
|
|
TcpService=0x00;
|
|
|
|
|
|
|
|
+ }
|
|
|
|
+ else if(*(Ptr+30)==0x8A)//继电器控制
|
|
|
|
+ {
|
|
|
|
+ TcpCmdAnswer[3] = 0x01;
|
|
|
|
+ memcpy(&TcpCmdAnswer[4],(Ptr+4),BATT_SN_LEN);
|
|
|
|
+ TcpCmdAnswer[21] = TCP_ENCPT_DISABLE;
|
|
|
|
+ TcpCmdAnswer[22] = 0x00;
|
|
|
|
+ TcpCmdAnswer[23] = 0x06;
|
|
|
|
+ memcpy(&TcpCmdAnswer[24],(Ptr+24),6);
|
|
|
|
+ TcpCmdAnswer[30] = bcc_chk(TcpCmdAnswer,30);
|
|
|
|
+ if(*(Ptr+31)==0x01)//0x01代表断开
|
|
|
|
+ {
|
|
|
|
+ AppDataInfo.appDataModify = TRUE;
|
|
|
|
+ AppDataInfo.RelayControl = TRUE;
|
|
|
|
+ tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
|
|
+ }
|
|
|
|
+ else if(*(Ptr+31)==0x00) //0x00代表关闭
|
|
|
|
+ {
|
|
|
|
+ AppDataInfo.appDataModify = TRUE;
|
|
|
|
+ AppDataInfo.RelayControl = FALSE;
|
|
|
|
+ tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
|
|
+ }
|
|
|
|
+ TcpService=0x00;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ else if(*(Ptr+30)==0x89)//蜂鸣器控制
|
|
|
|
+ {
|
|
|
|
+ TcpCmdAnswer[3] = 0x01;
|
|
|
|
+ memcpy(&TcpCmdAnswer[4],(Ptr+4),BATT_SN_LEN);
|
|
|
|
+ TcpCmdAnswer[21] = TCP_ENCPT_DISABLE;
|
|
|
|
+ TcpCmdAnswer[22] = 0x00;
|
|
|
|
+ TcpCmdAnswer[23] = 0x06;
|
|
|
|
+ memcpy(&TcpCmdAnswer[24],(Ptr+24),6);
|
|
|
|
+ TcpCmdAnswer[30] = bcc_chk(TcpCmdAnswer,30);
|
|
|
|
+ if(*(Ptr+31)==0x01)//0x01代表断开
|
|
|
|
+ {
|
|
|
|
+ BuzzerControl = TRUE;
|
|
|
|
+ tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
|
|
+ }
|
|
|
|
+ else if(*(Ptr+31)==0x00) //0x00代表关闭
|
|
|
|
+ {
|
|
|
|
+ BuzzerControl = FALSE;
|
|
|
|
+ tcpipConnectionSend(socContext.id,TcpCmdAnswer,31,0,0,0);
|
|
|
|
+ }
|
|
|
|
+ TcpService=0x00;
|
|
|
|
+
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|