将恢复事件发送3次失败重新发送去掉了
This commit is contained in:
parent
230109ef78
commit
371e8b0737
|
@ -363,7 +363,9 @@ static int at_device_nt26k_connect_tcp(struct at_device *device)
|
||||||
|
|
||||||
int at_send_data(struct at_device *device, const char *data, rt_size_t size)
|
int at_send_data(struct at_device *device, const char *data, rt_size_t size)
|
||||||
{
|
{
|
||||||
|
rt_mutex_take(nt26k_mutex, RT_WAITING_FOREVER);
|
||||||
#define NT26K_SEND_RESP_TIME (3000)
|
#define NT26K_SEND_RESP_TIME (3000)
|
||||||
|
|
||||||
const char *line_buffer = RT_NULL;
|
const char *line_buffer = RT_NULL;
|
||||||
at_response_t resp = at_create_resp(AT_CLIENT_RECV_BUFF_LEN, 2, NT26K_SEND_RESP_TIME);
|
at_response_t resp = at_create_resp(AT_CLIENT_RECV_BUFF_LEN, 2, NT26K_SEND_RESP_TIME);
|
||||||
if (resp == RT_NULL)
|
if (resp == RT_NULL)
|
||||||
|
@ -372,7 +374,7 @@ int at_send_data(struct at_device *device, const char *data, rt_size_t size)
|
||||||
at_delete_resp(resp);
|
at_delete_resp(resp);
|
||||||
return -RT_ERROR;
|
return -RT_ERROR;
|
||||||
}
|
}
|
||||||
rt_mutex_take(nt26k_mutex, RT_WAITING_FOREVER);
|
|
||||||
if (at_obj_exec_cmd(device->client, resp, TCP_SEND_DATA, socket_id, data) == RT_EOK)
|
if (at_obj_exec_cmd(device->client, resp, TCP_SEND_DATA, socket_id, data) == RT_EOK)
|
||||||
{
|
{
|
||||||
if ((line_buffer = at_resp_get_line(resp, 2)) != RT_NULL)
|
if ((line_buffer = at_resp_get_line(resp, 2)) != RT_NULL)
|
||||||
|
|
|
@ -1336,10 +1336,6 @@ static void Nt26k_Send_Thread_Entry(void *param)
|
||||||
if (result != RT_EOK)
|
if (result != RT_EOK)
|
||||||
{
|
{
|
||||||
LOG_E("nt26k send data failed result = [%d]\n", result);
|
LOG_E("nt26k send data failed result = [%d]\n", result);
|
||||||
if (SysControl.status == kAlarmRcyEvent)
|
|
||||||
{
|
|
||||||
Nt26k_Send_Event(kNt26kAlarmRcyEvent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (nt26k_recv_event & Nt26k_Get_Event_Flag(kNt26kFaultEvent))
|
else if (nt26k_recv_event & Nt26k_Get_Event_Flag(kNt26kFaultEvent))
|
||||||
|
@ -1360,10 +1356,6 @@ static void Nt26k_Send_Thread_Entry(void *param)
|
||||||
if (result != RT_EOK)
|
if (result != RT_EOK)
|
||||||
{
|
{
|
||||||
LOG_E("nt26k send data failed result = [%d]\n", result);
|
LOG_E("nt26k send data failed result = [%d]\n", result);
|
||||||
if (SysControl.status == kFaultRcyEvent)
|
|
||||||
{
|
|
||||||
Nt26k_Send_Event(kNt26kFaultRcyEvent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (nt26k_recv_event & Nt26k_Get_Event_Flag(kNt26kSelfCheckEvent))
|
else if (nt26k_recv_event & Nt26k_Get_Event_Flag(kNt26kSelfCheckEvent))
|
||||||
|
|
Loading…
Reference in New Issue