teste de publish
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
Diff: diversos.cpp
- Revision:
- 20:da1b8d80ba00
- Parent:
- 18:1eefda1f7736
- Child:
- 21:b9315cdd9275
--- a/diversos.cpp Sat Jan 27 22:34:14 2018 +0000 +++ b/diversos.cpp Mon Jan 29 14:22:38 2018 +0000 @@ -205,7 +205,7 @@ }else{ /*sprintf(diversos::msg,"File Corrupted checkSum16BIT_Lido <%lu>.\r\n",checkSum16BIT_Lido); modemCom::sendBufferCommandMode(2,diversos::msg,strlen(diversos::msg));*/ - sprintf(msg,"erro",checkSum16BIT_Lido); + sprintf(msg,"erro"); modemCom::sendBufferCommandMode(idConnection,msg,strlen(msg)); pc.printf("File Corrupted checkSum16BIT_Lido <%lu>.\r\n",checkSum16BIT_Lido); } @@ -266,18 +266,12 @@ //IR if(strstr(ptr,"IR,")){ uint8_t freq=38,porta=0; - pChar = strtok(ptr,","); - porta = atoi(strtok(NULL,",")); - porta--; //Trazendo para índice 0; - + pChar = strtok(ptr,","); freq = atoi(strtok(NULL,",")); - if(freq == 0){ - //Se não tiver frequência, ponha 38. - freq = 38; - } + porta = atoi(strtok(NULL,",")); pChar = strtok(NULL,"S"); - deserializaPacoteIR(pChar); + deserializaPacoteIR(pChar); enviaComandoIR(freq,porta); sprintf(msg,"WriteIR_ack"); modemCom::sendBufferCommandMode(idConnection,msg,strlen(msg));