Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DS1820 HighSpeedAnalogIn devices mbed
Revision 38:07d3907b74e5, committed 2018-06-08
- Comitter:
- brunofgc
- Date:
- Fri Jun 08 22:14:21 2018 +0000
- Parent:
- 37:0e95c85f0160
- Commit message:
- teste de publish para compilar no mbed-cli
Changed in this revision
--- a/DS1820.lib Thu Jun 07 16:19:52 2018 +0000 +++ b/DS1820.lib Fri Jun 08 22:14:21 2018 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/Sissors/code/DS1820/#01fb493e5d2f +https://os.mbed.com/users/brunofgc/code/DS1820/#01fb493e5d2f
--- a/devices.lib Thu Jun 07 16:19:52 2018 +0000 +++ b/devices.lib Fri Jun 08 22:14:21 2018 +0000 @@ -1,1 +1,1 @@ -devices#d3ef6bb8412a +https://os.mbed.com/users/brunofgc/code/devices/#4d44626e5b78
--- a/main.cpp Thu Jun 07 16:19:52 2018 +0000
+++ b/main.cpp Fri Jun 08 22:14:21 2018 +0000
@@ -301,7 +301,7 @@
}
void inicializaMaquina(){
- char aux[15];
+ //char aux[15];
time_t seconds;
seconds = time(NULL);
//Resetei pq?
@@ -353,7 +353,7 @@
//Inicio do programa;
int main() {
- uint8_t i;
+ //uint8_t i;
ESP_CH_PD = 0;
ESP_ESPGPIO_2 = 0;
ESP_RESET = 0;
@@ -374,7 +374,7 @@
bootLoader();
}
- sprintf(firmVersion,"06/06/18(BL)");
+ sprintf(firmVersion,"08/06/18(BL)");
eInt1.rise(&diversos::processaPulsosEDs);
@@ -511,29 +511,25 @@
if(debug){
pc.printf("\nMemoria RAM disponivel = %lu\n",diversos::memAvailable());
- pc.printf("\nEntrada 4 = %lu.\nEntrada 3 = %lu.\nEntrada 2 = %lu.\nEntrada 1 = %lu.\r\n",aiFiltrada[3],aiFiltrada[2],aiFiltrada[1],aiFiltrada[0]);
- pc.printf("Pulsos <%lu><%lu><%lu>.\r\n",pulsosEDs[0],pulsosEDs[1],pulsosEDs[2]);
-
- for(i=0;i<9;i++){
- printf("EntradaDigital[%u]=%u.\r\n",i,(entradasDigitais[i]>1));
- }
+ //pc.printf("\nEntrada 4 = %lu.\nEntrada 3 = %lu.\nEntrada 2 = %lu.\nEntrada 1 = %lu.\r\n",aiFiltrada[3],aiFiltrada[2],aiFiltrada[1],aiFiltrada[0]);
+ //pc.printf("Pulsos <%lu><%lu><%lu>.\r\n",pulsosEDs[0],pulsosEDs[1],pulsosEDs[2]);
}
time_t seconds = time(NULL);
- printf("Drome %s, Hora-> %s\n",firmVersion,ctime(&seconds));
+ pc.printf("Drome %s, %s\n",firmVersion,ctime(&seconds));
}
if(eventosRTC::rotina10Segundos){
//Executo abaixo a rotina de 10 segundos
eventosRTC::rotina10Segundos = false;
- verifySchedules();
- verifyAlarms();
- }
- }
- if((eventosRTC::minutos)){//&&(!modemCom::status.recebendoArquivoDoServer)){
- //Executo abaixo a rotina de 1 minuto
- eventosRTC::minutos = false;
- refreshSensoresTemperatura();
- writeReadingsToSD();
- }
+ verifySchedules();
+ verifyAlarms();
+ }
+ if((eventosRTC::minutos)){//&&(!modemCom::status.recebendoArquivoDoServer)){
+ //Executo abaixo a rotina de 1 minuto
+ eventosRTC::minutos = false;
+ refreshSensoresTemperatura();
+ writeReadingsToSD();
+ }
+ }
if(hardwareReset){
//Resetando
--- a/serialModem.h Thu Jun 07 16:19:52 2018 +0000
+++ b/serialModem.h Fri Jun 08 22:14:21 2018 +0000
@@ -1,7 +1,7 @@
#include "mbed.h"
#include "cmsis_os.h" //Nucleo do Real Time Operational System
#include "main.h" //Funções e variáveis globais
-#define maxBufInModem 2048
+#define maxBufInModem 1400
#define maxBufOutModem 512
namespace serialModem{
--- a/serialPC.cpp Thu Jun 07 16:19:52 2018 +0000
+++ b/serialPC.cpp Fri Jun 08 22:14:21 2018 +0000
@@ -10,7 +10,7 @@
void serialPC::serialPC_init(){
//Instnciando o timer de processamento de pacotes entrantes na serial PC
- pc.baud(230400); //Inicialização de recurso Serial uart pc com baudrate 230400
+ pc.baud(115200); //Inicialização de recurso Serial uart pc com baudrate 230400
pc.printf("Serial PC inicializado.\n"); //Exibe mensagem de inicialização da serial pc
//Criando timer_pacote
@@ -58,6 +58,14 @@
if(strstr(bufIn,"config")!=NULL){
sdCard::exibeArquivo(&sdCard::config);
+ }
+
+ if(strstr(bufIn,"sensUP")!=NULL){
+ temperaturas[0]=55;
+ }
+
+ if(strstr(bufIn,"sensDOWN")!=NULL){
+ temperaturas[0]=0;
}
if(strstr(bufIn,"devices")!=NULL){