Commit 6c0b8c71 authored by 李冠华's avatar 李冠华

🐞 fix:增加在上电期间请求重发,也对比两次的功能

parent 6951756a
...@@ -18,6 +18,7 @@ uint32_t RS485TXTotalExecutionNum = 0u; ...@@ -18,6 +18,7 @@ uint32_t RS485TXTotalExecutionNum = 0u;
uint8_t RerequestCount = 0U; uint8_t RerequestCount = 0U;
uint8_t UARTRxBufClean = 0u; uint8_t UARTRxBufClean = 0u;
uint32_t BenCiXieRuStoreArr[2] = {0U,0U}; /*此值用于存储刚给表写入的值。当表回复后此值在变化*/ uint32_t BenCiXieRuStoreArr[2] = {0U,0U}; /*此值用于存储刚给表写入的值。当表回复后此值在变化*/
uint8_t DuiBiLiangCi = 0U;
static void NVS_Test_BenCiXieRuNum(void); static void NVS_Test_BenCiXieRuNum(void);
static void NVS_Test_Rerequest(void); static void NVS_Test_Rerequest(void);
...@@ -42,6 +43,7 @@ void NVS_Test_Init(void) ...@@ -42,6 +43,7 @@ void NVS_Test_Init(void)
UARTRxBufClean = 0U; UARTRxBufClean = 0U;
BenCiXieRuStoreArr[0] = 0U; BenCiXieRuStoreArr[0] = 0U;
BenCiXieRuStoreArr[1] = 0U; BenCiXieRuStoreArr[1] = 0U;
DuiBiLiangCi = 0U;
} }
void NVS_Test_Service(void) void NVS_Test_Service(void)
...@@ -76,7 +78,7 @@ void NVS_Test_Service(void) ...@@ -76,7 +78,7 @@ void NVS_Test_Service(void)
{ {
if(JieShouDaoValue != XieRuLagNum) if(JieShouDaoValue != XieRuLagNum)
{ {
if ((JieShouDaoValue == XieRuLookaheadNum) && (BenCiShangDianZhiXingCount <= 1U)) if ((JieShouDaoValue == XieRuLookaheadNum) && ((BenCiShangDianZhiXingCount <= 1U) || (DuiBiLiangCi == 1U)))
{ {
; ;
} }
...@@ -84,7 +86,7 @@ void NVS_Test_Service(void) ...@@ -84,7 +86,7 @@ void NVS_Test_Service(void)
{ {
errNum ++; errNum ++;
} }
DuiBiLiangCi = 0U;
} }
} }
if (errNum == 0U) if (errNum == 0U)
...@@ -165,4 +167,5 @@ static void NVS_Test_Rerequest(void) ...@@ -165,4 +167,5 @@ static void NVS_Test_Rerequest(void)
RS485TXBenCiXieRuNum = 0xFFFFEEEEU; RS485TXBenCiXieRuNum = 0xFFFFEEEEU;
RS485TXTotalExecutionNum = 0xFFFFEEEEU; RS485TXTotalExecutionNum = 0xFFFFEEEEU;
RS485_TX_finish = 0U; RS485_TX_finish = 0U;
DuiBiLiangCi = 1u;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment