fix(duch): Cat1 DUCH模式30分钟跑满->CAT_ONE_INIT重初始化
- DUCH_MODE while循环累计实际延时runMs - 30分钟(1,800,000ms)后设CAT_ONE_INIT+AtCmdIdx=0重走初始化 - 断线靠+LIPURC:0,0 URC走OFF->IDEL重连 - Cat1DuchReady=false+break防fallthrough到OFF
This commit is contained in:
@@ -428,40 +428,7 @@
|
|||||||
<Name></Name>
|
<Name></Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint>
|
<Breakpoint/>
|
||||||
<Bp>
|
|
||||||
<Number>0</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>643</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>55060</Address>
|
|
||||||
<ByteObject>0</ByteObject>
|
|
||||||
<HtxType>0</HtxType>
|
|
||||||
<ManyObjects>0</ManyObjects>
|
|
||||||
<SizeOfObject>0</SizeOfObject>
|
|
||||||
<BreakByAccess>0</BreakByAccess>
|
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
|
||||||
<Filename>..\source\User\Src\CatOneTask.c</Filename>
|
|
||||||
<ExecCommand></ExecCommand>
|
|
||||||
<Expression>\\GateWay\../source/User/Src/CatOneTask.c\643</Expression>
|
|
||||||
</Bp>
|
|
||||||
<Bp>
|
|
||||||
<Number>1</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>569</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>54386</Address>
|
|
||||||
<ByteObject>0</ByteObject>
|
|
||||||
<HtxType>0</HtxType>
|
|
||||||
<ManyObjects>0</ManyObjects>
|
|
||||||
<SizeOfObject>0</SizeOfObject>
|
|
||||||
<BreakByAccess>0</BreakByAccess>
|
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
|
||||||
<Filename>..\source\User\Src\CatOneTask.c</Filename>
|
|
||||||
<ExecCommand></ExecCommand>
|
|
||||||
<Expression>\\GateWay\../source/User/Src/CatOneTask.c\569</Expression>
|
|
||||||
</Bp>
|
|
||||||
</Breakpoint>
|
|
||||||
<WatchWindow1>
|
<WatchWindow1>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>0</count>
|
<count>0</count>
|
||||||
@@ -503,6 +470,11 @@
|
|||||||
<WinNumber>1</WinNumber>
|
<WinNumber>1</WinNumber>
|
||||||
<ItemText>CatOne.AtCmd</ItemText>
|
<ItemText>CatOne.AtCmd</ItemText>
|
||||||
</Ww>
|
</Ww>
|
||||||
|
<Ww>
|
||||||
|
<count>8</count>
|
||||||
|
<WinNumber>1</WinNumber>
|
||||||
|
<ItemText>start,0x0A</ItemText>
|
||||||
|
</Ww>
|
||||||
</WatchWindow1>
|
</WatchWindow1>
|
||||||
<WatchWindow2>
|
<WatchWindow2>
|
||||||
<Ww>
|
<Ww>
|
||||||
|
|||||||
@@ -543,6 +543,7 @@ void CatOneLoopHandler(void)
|
|||||||
|
|
||||||
case CAT_ONE_DUCH_MODE:
|
case CAT_ONE_DUCH_MODE:
|
||||||
Cat1DuchReady = true;
|
Cat1DuchReady = true;
|
||||||
|
uint32_t runMs = 0;
|
||||||
while(ChannelIsActive(CatOne.GateWay->ConfigPara, CH_CAT1)) {
|
while(ChannelIsActive(CatOne.GateWay->ConfigPara, CH_CAT1)) {
|
||||||
if(duchRd != duchWr) {
|
if(duchRd != duchWr) {
|
||||||
uint16_t avail = (duchWr - duchRd) & 0x1FFF;
|
uint16_t avail = (duchWr - duchRd) & 0x1FFF;
|
||||||
@@ -550,6 +551,7 @@ void CatOneLoopHandler(void)
|
|||||||
sprintf(CatOne.CatOneSendBuff, "AT+QISEND=0,%d\r\n", n);
|
sprintf(CatOne.CatOneSendBuff, "AT+QISEND=0,%d\r\n", n);
|
||||||
DebugOrCat1UartSend((uint8_t *)CatOne.CatOneSendBuff, strlen(CatOne.CatOneSendBuff));
|
DebugOrCat1UartSend((uint8_t *)CatOne.CatOneSendBuff, strlen(CatOne.CatOneSendBuff));
|
||||||
rt_thread_delay(200);
|
rt_thread_delay(200);
|
||||||
|
runMs += 200;
|
||||||
if(duchRd + n <= 8192) {
|
if(duchRd + n <= 8192) {
|
||||||
DebugOrCat1UartSend((uint8_t *)&duchRing[duchRd], n);
|
DebugOrCat1UartSend((uint8_t *)&duchRing[duchRd], n);
|
||||||
} else {
|
} else {
|
||||||
@@ -559,13 +561,19 @@ void CatOneLoopHandler(void)
|
|||||||
}
|
}
|
||||||
DebugOrCat1UartSend((uint8_t *)"\x1A", 1);
|
DebugOrCat1UartSend((uint8_t *)"\x1A", 1);
|
||||||
rt_thread_delay(500);
|
rt_thread_delay(500);
|
||||||
|
runMs += 500;
|
||||||
duchRd = (duchRd + n) & 0x1FFF;
|
duchRd = (duchRd + n) & 0x1FFF;
|
||||||
} else {
|
} else {
|
||||||
rt_thread_delay(50);
|
rt_thread_delay(50);
|
||||||
|
runMs += 50;
|
||||||
|
}
|
||||||
|
if(runMs >= 1800000) {
|
||||||
|
CatOne.Cat1Status = CAT_ONE_INIT;
|
||||||
|
CatOne.AtCmdIdx = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Cat1DuchReady = false;
|
Cat1DuchReady = false;
|
||||||
CatOne.Cat1Status = CAT_ONE_IDEL;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CAT_ONE_OFF:
|
case CAT_ONE_OFF:
|
||||||
|
|||||||
Reference in New Issue
Block a user