EZR

Dependencies:   CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04

Fork of smartRamalKW by Equipe Firmware V2COM

Files at this revision

API Documentation at this revision

Comitter:
tpadovani
Date:
Tue Oct 13 14:54:15 2015 +0000
Parent:
19:1f623070b9dd
Child:
21:62316df0c24b
Commit message:
Implementado led de REDE e corre??o nas mensagens de log

Changed in this revision

GGSProtocol.lib Show annotated file Show diff for this revision Revisions of this file
PIMA.lib Show annotated file Show diff for this revision Revisions of this file
appCommands.cpp Show annotated file Show diff for this revision Revisions of this file
appCommands.h Show annotated file Show diff for this revision Revisions of this file
appParameters.cpp Show annotated file Show diff for this revision Revisions of this file
cmd/configurarParametros.cpp Show annotated file Show diff for this revision Revisions of this file
cmd/detectaCarga.cpp Show annotated file Show diff for this revision Revisions of this file
memoriaMassa.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/GGSProtocol.lib	Thu Oct 08 22:50:07 2015 +0000
+++ b/GGSProtocol.lib	Tue Oct 13 14:54:15 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Equipe-Firmware-V2COM/code/GGSProtocol/#d8e03350b1da
+http://developer.mbed.org/teams/Equipe-Firmware-V2COM/code/GGSProtocol/#9184495c0210
--- a/PIMA.lib	Thu Oct 08 22:50:07 2015 +0000
+++ b/PIMA.lib	Tue Oct 13 14:54:15 2015 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/Equipe-Firmware-V2COM/code/PIMA/#9dedbf5dbacd
+https://developer.mbed.org/teams/Equipe-Firmware-V2COM/code/PIMA/#b74d1bb6816c
--- a/appCommands.cpp	Thu Oct 08 22:50:07 2015 +0000
+++ b/appCommands.cpp	Tue Oct 13 14:54:15 2015 +0000
@@ -7,6 +7,7 @@
 }
 
 void executaComando(unsigned char tamanho, unsigned char sequencia, unsigned char tipo, char * dados){
+    ledNetwork = LED_ON;
     switch(tipo){
         case CMD_LER_VERSAO:
             cmdLerVersao();
@@ -91,7 +92,7 @@
     APP_PARAMETERS.estadoRele = estado;
     APP_PARAMETERS.contadorCiclos++;
     if(!param.saveParameters()){
-        printf("[GGS] Erro gravando estado do rele\r\n");
+        printf("[GGS] Error writing relay state\r\n");
     }
 }
 
@@ -101,7 +102,7 @@
 
 void respBuscarConcentrador(){
 //    if(!destBroadcast){
-//        printf("[GGS] Recebeu ACK do concentrador\r\n");
+//        printf("[GGS] ACK received\r\n");
 //        if(((unsigned char *)&medidor)[0] != 0xff){ // Ja detectou algum medidor. Pode parar de enviar anuncios.
 //            timeoutAnuncio.detach();
 //        }
--- a/appCommands.h	Thu Oct 08 22:50:07 2015 +0000
+++ b/appCommands.h	Tue Oct 13 14:54:15 2015 +0000
@@ -67,6 +67,7 @@
 extern Parameters param;
 extern SerialNumber sn;
 extern ParametersBlock APP_PARAMETERS;
+extern DigitalOut ledNetwork;
 extern void softReset();
 
 void enviaRespostaGGS(char * dados, int tamanho);
--- a/appParameters.cpp	Thu Oct 08 22:50:07 2015 +0000
+++ b/appParameters.cpp	Tue Oct 13 14:54:15 2015 +0000
@@ -155,6 +155,6 @@
         APP_PARAMETERS.ALARMS_STATES &= ~(1 << alarm);
     }
     if(!param.saveParameters()){
-        printf("[Param] Erro gravando estado do alarme %d\r\n", alarm);
+        printf("[Param] Error writing alarm states (alarm %d)\r\n", alarm);
     }
 }
--- a/cmd/configurarParametros.cpp	Thu Oct 08 22:50:07 2015 +0000
+++ b/cmd/configurarParametros.cpp	Tue Oct 13 14:54:15 2015 +0000
@@ -17,7 +17,7 @@
     APP_PARAMETERS.contadorCiclos = totalizador;
     
     if(!param.saveParameters()){
-        printf("[GGS] Erro gravando parametros\r\n");
+        printf("[GGS] Error writing parameters\r\n");
         exec.enviaResposta(RESP_CONFIGURAR_PARAMETROS, (char)ERRO_GRAVACAO);
         return;
     }
--- a/cmd/detectaCarga.cpp	Thu Oct 08 22:50:07 2015 +0000
+++ b/cmd/detectaCarga.cpp	Tue Oct 13 14:54:15 2015 +0000
@@ -48,7 +48,7 @@
         return;
     }
     if(!param.saveParameters()){
-        printf("[GGS] Erro gravando parametro de lado da carga\r\n");
+        printf("[GGS] Error writing LOAD_CHANNEL parameter\r\n");
         exec.enviaResposta(RESP_DETECTA_CARGA, DETECTA_CARGA_FALHA_GRAVAR_PARAM);
         return;
     }
--- a/memoriaMassa.cpp	Thu Oct 08 22:50:07 2015 +0000
+++ b/memoriaMassa.cpp	Tue Oct 13 14:54:15 2015 +0000
@@ -5,7 +5,7 @@
     queue[0].init(size, sector1);
     queue[1].init(size, sector2);
     leituraPeriodica.attach(this, &MemoriaMassa::disparaLeitura, mmPeriodoSec);
-    printf("[MM] Periodic Reading started (%d seconds)\r\n", mmPeriodoSec);
+    printf("[LP] Periodic Reading started (%d seconds)\r\n", mmPeriodoSec);
 }
 
 void MemoriaMassa::disparaLeitura(){
@@ -28,8 +28,8 @@
     leitura.value.floatValue = f2;
     queue[1].add((char*)&leitura);
     
-    printf("[MM] New record stored: Time=%d, Ch0=%f\r\n", leitura.time, f1);
-    printf("[MM] New record stored: Time=%d, Ch1=%f\r\n", leitura.time, f2);
+    printf("[LP] New record stored: Time=%d, Ch0=%f\r\n", leitura.time, f1);
+    printf("[LP] New record stored: Time=%d, Ch1=%f\r\n", leitura.time, f2);
     
     checkAlarms(f1, f2);
 
@@ -38,7 +38,7 @@
 
 char* MemoriaMassa::getMM(int channel){
     if(channel < 0 || channel > 1){
-        printf("[MM] Invalid channel %d\r\n", channel);
+        printf("[LP] Invalid channel %d\r\n", channel);
         return NULL;
     }
     return queue[channel].getAll();
@@ -58,9 +58,9 @@
     tensaoMinima = linha < APP_PARAMETERS.LIMITE_TENSAO_MINIMA_LINHA_V;
     tensaoMaxima = linha > APP_PARAMETERS.LIMITE_TENSAO_MAXIMA_LINHA_V;
     
-    printf("[MM] Linha TensaoZero = %d\r\n", tensaoZero);
-    printf("[MM] Linha TensaoMinima = %d\r\n", tensaoMinima);
-    printf("[MM] Linha TensaoMaxima = %d\r\n", tensaoMaxima);
+    printf("[LP] Line Zero Voltage ST = %d\r\n", tensaoZero);
+    printf("[LP] Line Undervoltage ST = %d\r\n", tensaoMinima);
+    printf("[LP] Line Overvoltage  ST = %d\r\n", tensaoMaxima);
     
     if(isAlarmEnabled(ALARME_LINHA_TENSAO_ZERO)){
         alarm.writeAlarm(ALARME_LINHA_TENSAO_ZERO, tensaoZero, getAlarmState(ALARME_LINHA_TENSAO_ZERO));
@@ -76,9 +76,9 @@
     tensaoMinima = carga < APP_PARAMETERS.LIMITE_TENSAO_MINIMA_CARGA_V;
     tensaoMaxima = carga > APP_PARAMETERS.LIMITE_TENSAO_MAXIMA_CARGA_V;
     
-    printf("[MM] Carga TensaoZero = %d\r\n", tensaoZero);
-    printf("[MM] Carga TensaoMinima = %d\r\n", tensaoMinima);
-    printf("[MM] Carga TensaoMaxima = %d\r\n", tensaoMaxima);
+    printf("[LP] Load Zero Voltage ST = %d\r\n", tensaoZero);
+    printf("[LP] Load Undervoltage ST = %d\r\n", tensaoMinima);
+    printf("[LP] Load Overvoltage  ST = %d\r\n", tensaoMaxima);
     
     if(isAlarmEnabled(ALARME_CARGA_TENSAO_ZERO)){
         alarm.writeAlarm(ALARME_CARGA_TENSAO_ZERO, tensaoZero, getAlarmState(ALARME_CARGA_TENSAO_ZERO));