|
@@ -68,6 +68,7 @@ static unsigned char XbeeConst_ReadNum0 = 0;
|
|
|
static unsigned char XbeeConst_FrameLength0_Remote = 0, XbeeConst_ReadNum0_Remote = 0;
|
|
|
|
|
|
unsigned char XbeeConst_FrameNumLast=0; //上次发送的帧编号
|
|
|
+unsigned char RemoteFrameNumLast = 0xFF; //铲车接收的上次帧编号
|
|
|
unsigned char XbeeConst_FTxBuf0[50]; //处理发送无线临时表
|
|
|
|
|
|
unsigned char* XbeeConst_PTxBuf0; //处理发送无线临时表
|
|
@@ -562,6 +563,7 @@ void RX_Remote(void) {
|
|
|
|
|
|
if ((0xff - checksum) == XbeeConst_FRxBuf0_Remote[XbeeConst_FrameLength0_Remote]) //校验成功
|
|
|
{
|
|
|
+
|
|
|
if (
|
|
|
(((XbeeConst_FRxBuf0_Remote[2] & 0x1F) == XbeeConst_RemoteAddress && (WeightConst_SBType == 2 || WeightConst_SBType == 7))
|
|
|
||
|
|
@@ -690,7 +692,8 @@ void RX_Remote(void) {
|
|
|
}
|
|
|
|
|
|
RemoteSendDisplay = 1;
|
|
|
- if (XbeeConst_FRxBuf0_Remote[4]==0x01 && button_state.b1==0)//收到1号键
|
|
|
+ if (XbeeConst_FRxBuf0_Remote[4]==0x01 && button_state.b1==0
|
|
|
+ && RemoteFrameNumLast != XbeeConst_FRxBuf0_Remote[XbeeConst_FRxBuf0_Remote[1]])//收到1号键
|
|
|
{
|
|
|
if (pf_comp.data.needBegin == 1 && WeightConst_WeightHaveBegin==0)
|
|
|
{
|
|
@@ -718,7 +721,8 @@ void RX_Remote(void) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- else if (XbeeConst_FRxBuf0_Remote[4]==0x02 && button_state.b2==0) //收到2号键
|
|
|
+ else if (XbeeConst_FRxBuf0_Remote[4]==0x02 && button_state.b2==0
|
|
|
+ && RemoteFrameNumLast != XbeeConst_FRxBuf0_Remote[XbeeConst_FRxBuf0_Remote[1]]) //收到2号键
|
|
|
{
|
|
|
if(!WeightConst_DELAYON>0)
|
|
|
{
|
|
@@ -731,8 +735,9 @@ void RX_Remote(void) {
|
|
|
button_state.b2=1; //5秒内不可按键
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ RemoteFrameNumLast = XbeeConst_FRxBuf0_Remote[XbeeConst_FRxBuf0_Remote[1]];
|
|
|
+ }
|
|
|
XbeeConst_ReadNum0_Remote = 0; //循环计数清零
|
|
|
XbeeConst_FrameLength0_Remote = 0;
|
|
|
} else {
|