teste de publish
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
Diff: main.cpp
- Revision:
- 11:631bea162800
- Parent:
- 10:263c093f8977
- Child:
- 13:b9183b4bc049
--- a/main.cpp Mon Aug 14 13:59:27 2017 +0000 +++ b/main.cpp Wed Aug 30 18:42:18 2017 +0000 @@ -380,6 +380,7 @@ modemCom::inicializaModem(); modemCom::conectaWiFi(); eventosRTC::rotina15Minutos=true; + sdCard::deleteSentFiles=false; while(true){ osDelay(10); @@ -423,13 +424,20 @@ eventosRTC::rotina10Segundos = false; verifySchedules(); } + + if(sdCard::deleteSentFiles){ + pc.printf("Recebido comando para deletar arquivos enviados.\n"); + sdCard::deleteBanks(sdCard::currentBankSending); + if(sdCard::modificaCurrentBank(sdCard::currentBank,!sdCard::currentBankSending)){ + sdCard::deleteSentFiles=false; + } + } } if(executaComandoServer){ executaComandoServer = false; commands::exec(modemCom::status.connIDServerCommand); - } - + } if(modemCom::atendendoWebServer){ modemCom::atendendoWebServer = false; @@ -442,6 +450,6 @@ if(boolExecAct){ dispositivos[0]->execAct(act); boolExecAct = false; - } + } } }