this is using the mbed os version 5-13-1
Diff: source/ATCmdManager.cpp
- Branch:
- PassingRegression
- Revision:
- 110:c722dda4f2ff
- Parent:
- 109:c274780ff609
- Child:
- 112:a0999ea4ece0
--- a/source/ATCmdManager.cpp Wed May 08 19:38:35 2019 +0000
+++ b/source/ATCmdManager.cpp Thu May 09 13:21:12 2019 +0000
@@ -110,8 +110,6 @@
dequeueWiFidataResponse();
updateWiFiMgrStatus();
char * respStr;
- //if(at_resp > AT_COMMAND_FAILED)
- //return;
switch(at_resp){
case AT_RESP_NONE:
// IDLE response state
@@ -129,9 +127,6 @@
case AT_DETAILED_SCAN_RESP:
// AT_DETAILED_SCAN_RESP response state
dbg_printf(LOG, "\n [ATCMD MAN] WIFI DETAILED SCAN RESPONSE RECEIVED!!\r\n");
- //_smutex.lock();
- //sendAtConfirmation(OK_RESP); //_parser.send(OK_RESP);
- //_smutex.unlock();
respStr = (char *) resp_data->buffer;
sendAtConfirmationFreeMpool(respStr);
at_resp = AT_RESP_NONE;
@@ -364,6 +359,7 @@
}
bool ATCmdManager::createHttpRequest()
{
+#ifdef USE_WIFI_STATE_CONTROL
static int wifiBusyTimeOut = 0;
if(wifiStateControl != AT_RESP_NONE && wifiBusyTimeOut < 10) // wifi busy!
{
@@ -371,6 +367,7 @@
return false;
}
wifiBusyTimeOut = 0;
+#endif
http_request_t *http_req; // = new http_request_t;
wifi_data_msg_t data_msg;
http_req = (http_request_t *)data_msg.buffer;
@@ -502,6 +499,7 @@
if(queueWiFiDataRequest(data_msg) == true)
{
wifiStateControl = AT_HTTPS_RESP_DOWNLOAD;
+ return true;
}
return true;
}
@@ -552,9 +550,6 @@
{
//_parser.process_oob();
while (_parser.process_oob() && all) {
- if(debug_flag>0){
- dbg_printf(LOG, "finished queuing WIFI CONNECT CMD -- back to process_oob loop \r\n");
- }
}
break;
}
@@ -648,11 +643,7 @@
#endif
{
while (_parser.process_oob() && all) {
- dbg_printf(LOG, "inbound message found... msgCnt = %d \r\n", ++msgCnt);
- if(debug_flag>0){
- dbg_printf(LOG, "finished queuing WIFI CONNECT CMD -- back to process_oob loop \r\n");
- }
- }
+ }
}
}
set_timeout();
@@ -1199,7 +1190,7 @@
if(wifiCmd == NULL){
dbg_printf(LOG, "[ATCMD MAN] try malloc() : queued memory allocation failed\n");
//_event_queue.call_in(10, &print_memory_info);
- _event_queue.call_in(10, &print_heap_and_isr_stack_info);
+ //_event_queue.call_in(10, &print_heap_and_isr_stack_info);
//print_memory_info();
//print_heap_and_isr_stack_info();
return false;
@@ -1214,10 +1205,6 @@
}
bool ATCmdManager::dequeueATresponse(){
- if(debug_flag>0){
- debug_flag--;
- dbg_printf(LOG, "Called dequeueATresponse after WIFI CONNECT CMD \r\n");
- }
if(at_resp != AT_RESP_NONE) return false; // busy
osEvent evt = _wiFi2ATCmdQueue->get(0);
if(evt.status == osEventMessage){
@@ -1267,17 +1254,13 @@
}
bool ATCmdManager::dequeueWiFidataResponse(){
- if(debug_flag>0){
- debug_flag--;
- dbg_printf(LOG, "Called dequeueWiFidataResponse after WIFI CONNECT CMD \r\n");
- }
if(at_resp != AT_RESP_NONE) return false; // busy
osEvent evt = _wiFi2ATDataQueue->get(0);
if(evt.status == osEventMessage){
resp_data = (at_data_msg_t*)evt.value.p;
setNextResponse(resp_data->at_resp);
dbg_printf(LOG, "[ATCMD MAN] dequeued data size = %d : at_resp = %d\n", resp_data->dataLen, resp_data->at_resp);
- _event_queue.call_in(10, &print_heap_and_isr_stack_info);
+ //_event_queue.call_in(10, &print_heap_and_isr_stack_info);
//print_heap_and_isr_stack_info();
}
return true;
@@ -1400,6 +1383,6 @@
_wiFi2ATDatamPool->free(resp_data);
resp_data = NULL;
//print_memory_info();
- _event_queue.call_in(10, &print_heap_and_isr_stack_info);
+ //_event_queue.call_in(10, &print_heap_and_isr_stack_info);
//print_heap_and_isr_stack_info();
}