Versão limpa em 04/09/2014. Telnet funcionando.

Dependencies:   EthernetInterface mbed-rtos mbed NTPClient

Files at this revision

API Documentation at this revision

Comitter:
mlucas82
Date:
Fri Mar 27 15:22:40 2015 +0000
Branch:
feature-logs
Parent:
17:2d80e3aeeea7
Child:
20:54e8563fb78c
Commit message:
Defined some entries in log: initialization, normal start of program and wrong code.

Changed in this revision

Codes/PmedLog.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Codes/PmedLog.cpp	Fri Mar 27 15:14:12 2015 +0000
+++ b/Codes/PmedLog.cpp	Fri Mar 27 15:22:40 2015 +0000
@@ -7,6 +7,13 @@
 
 #include "PmedLog.h"
 
+
+//define as constant some log entries
+static const char *PMEDLOG_INITIALIZING     = " Initializing Protegemed ... ";
+static const char *PMEDLOG_STARTED          = " Started Protegemed ! ";
+static const char *PMEDLOG_WRONGCODE        = " Oops... wrong code, a reset may be expected ";
+
+
 int PmedLog::m_entry = 0;
 time_t PmedLog::m_lastMark = 0;
 
--- a/main.cpp	Fri Mar 27 15:14:12 2015 +0000
+++ b/main.cpp	Fri Mar 27 15:22:40 2015 +0000
@@ -129,6 +129,8 @@
 }
 
 int main() {
+    PmedLog::WriteEntry(PMEDLOG_INITIALIZING);
+
     printf("\r\nNova versao 44...\r\n");
     FILE *f;
     //Set Highest Priority
@@ -174,10 +176,13 @@
     
     //printf("0x%lx\n",  LargeBuffer);
     
+    PmedLog::WriteEntry(PMEDLOG_STARTED);
+    
     //Jump to the capture routine(will run on this thread)  
     thread1(NULL);
    
     while(1){//never reaches here  
+        PmedLog::WriteEntry(PMEDLOG_WRONGCODE);
         printf("Reset\n");
         f = fopen(FILENAMERESET, "a");
         if (f == NULL)