|
@@ -531,24 +531,49 @@ void UDP_Client_Handle(void)
|
|
|
resend_counter++;
|
|
resend_counter++;
|
|
|
goto_step(STEP_SET_CFUN_0);
|
|
goto_step(STEP_SET_CFUN_0);
|
|
|
break;
|
|
break;
|
|
|
|
|
+// case STEP_SET_CFUN_0: // 设置最小功能模式
|
|
|
|
|
+// result = bc260y.set_cfun(0);
|
|
|
|
|
+// if(result == Result_Success)
|
|
|
|
|
+// {
|
|
|
|
|
+// Log_Printf_Debug("设置最小模式成功\r\n");
|
|
|
|
|
+// if(resend_counter > 1) // 重发次数
|
|
|
|
|
+// {
|
|
|
|
|
+//
|
|
|
|
|
+// goto_step(STEP_ENTER_SLEEP);
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// else
|
|
|
|
|
+// {
|
|
|
|
|
+// goto_step(STEP_START);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// else if(result == Result_Failed)
|
|
|
|
|
+// {
|
|
|
|
|
+// goto_step(STEP_ENTER_SLEEP);
|
|
|
|
|
+// }
|
|
|
|
|
+// break;
|
|
|
case STEP_SET_CFUN_0: // 设置最小功能模式
|
|
case STEP_SET_CFUN_0: // 设置最小功能模式
|
|
|
- result = bc260y.set_cfun(0);
|
|
|
|
|
- if(result == Result_Success)
|
|
|
|
|
- {
|
|
|
|
|
- Log_Printf_Debug("设置最小模式成功\r\n");
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if(resend_counter > 1) // 重发次数
|
|
if(resend_counter > 1) // 重发次数
|
|
|
{
|
|
{
|
|
|
- goto_step(STEP_ENTER_SLEEP);
|
|
|
|
|
|
|
+ result = bc260y.set_cfun(0);
|
|
|
|
|
+ if(result == Result_Success)
|
|
|
|
|
+ {
|
|
|
|
|
+ Log_Printf_Debug("设置最小模式成功\r\n");
|
|
|
|
|
+ goto_step(STEP_ENTER_SLEEP);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if(result == Result_Failed)
|
|
|
|
|
+ {
|
|
|
|
|
+ goto_step(STEP_ENTER_SLEEP);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
goto_step(STEP_START);
|
|
goto_step(STEP_START);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- else if(result == Result_Failed)
|
|
|
|
|
- {
|
|
|
|
|
- goto_step(STEP_ENTER_SLEEP);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
break;
|
|
break;
|
|
|
case STEP_ENTER_SLEEP: // 进入睡眠
|
|
case STEP_ENTER_SLEEP: // 进入睡眠
|
|
|
resend_counter=0;//失败重发置0
|
|
resend_counter=0;//失败重发置0
|