Log
Dependents: oldheating gps motorhome heating
Diff: log.cpp
- Revision:
- 3:7806ff3f1a2d
- Parent:
- 2:ee4ec2d72525
- Child:
- 4:c95b09342a93
--- a/log.cpp Sat Feb 04 18:45:41 2017 +0000 +++ b/log.cpp Tue May 09 15:08:38 2017 +0000 @@ -1,8 +1,6 @@ #include "mbed.h" #include "time.h" -#define LOG_FILE "/local/log.txt" - -LocalFileSystem local("local"); +#include "io.h" #define BUFFER_LENGTH 4096 static char buffer[BUFFER_LENGTH]; @@ -20,6 +18,9 @@ //Only add if allowed if (!enable) return; + + IoPcUart.putc(c); + char* pNext; //Work out what has to be sent @@ -172,9 +173,8 @@ LogV(fmt, argptr); va_end(argptr); } -void LogSave() +void LogSave(FILE *fp) { - FILE *fp = fopen(LOG_FILE, "w"); LogEnumerateStart(); while(1) {