teste de publish

Dependencies:   DS1820 HighSpeedAnalogIn devices mbed

Revision:
33:a60abda630f7
Parent:
30:8a06a85d8807
Child:
34:348991c54ff3
--- a/diversos.cpp	Sat May 26 14:17:55 2018 +0000
+++ b/diversos.cpp	Wed May 30 04:24:55 2018 +0000
@@ -182,10 +182,11 @@
         }
         
         ptr=strstr(ptrComando,"sendArmazenamento");
-        if(ptr) {
-            eventosRTC::rotinaEnvioDeDados=maxTentativasEnvioDados;
+        if(ptr) {            
             sprintf(msg,"sendArmazenamento_ack");   
             modemCom::sendBufferCommandMode(idConnection,msg,strlen(msg));
+            eventosRTC::rotinaEnvioDeDados=maxTentativasEnvioDados;
+            modemCom::timeOutEnvioDados=maxTimeEnvioDados;
         }
         
         ptr=strstr(ptrComando,"deleteArmazenamento");
@@ -207,7 +208,7 @@
             fileCheckSum16BIT = atoi(pCharFile);
             remove("/sd/RAD/tempFile.bin");
             pc.printf("Iniciando recepcao do server arquivo deviceCfg.\n");
-            modemCom::status.recebendoArquivoDoServer = 600;
+            modemCom::status.recebendoArquivoDoServer = 250;
             
             
             
@@ -308,10 +309,11 @@
             modemCom::sendBufferCommandMode(idConnection,msg,strlen(msg));    
         }
         
-        if(strstr(ptr,"enviaDadosAoServer")){            
-            eventosRTC::rotinaEnvioDeDados=maxTentativasEnvioDados;
+        if(strstr(ptr,"enviaDadosAoServer")){                                    
             sprintf(msg,"ack");
             modemCom::sendBufferCommandMode(idConnection,msg,strlen(msg));    
+            eventosRTC::rotinaEnvioDeDados=maxTentativasEnvioDados;
+            modemCom::timeOutEnvioDados=maxTimeEnvioDados;
         }
         
         ptr=strstr(ptrComando,"mbwrite:");