.
Dependencies: SDHCFileSystem mbed
Diff: main.cpp
- Revision:
- 19:610a71236b6e
- Parent:
- 18:a4cf0547bfc2
- Child:
- 20:153800633e28
diff -r a4cf0547bfc2 -r 610a71236b6e main.cpp --- a/main.cpp Mon Dec 17 02:57:31 2012 +0000 +++ b/main.cpp Sun Dec 23 22:57:52 2012 +0000 @@ -81,13 +81,11 @@ #include "mbed.h" #include "CAN.h" #include "SDHCFileSystem.h" -#include "PowerControl/PowerControl.h" -#include "PowerControl/EthernetPowerControl.h" #define upLine "\033[1A" #define maxBufLen 2048 #define canTimeout 5 -#define maxFileNum 100 +#define maxFileNum 30 void Log (char *message); void LogErr (char *message); @@ -115,7 +113,7 @@ char sTemp[35] ; volatile int writePointer = 0; volatile int secsIdle = canTimeout; -volatile bool canIdle = true; +volatile bool canIdle = false; Serial pc(USBTX, USBRX); extern "C" void RTC_IRQHandler() { @@ -323,7 +321,9 @@ pc.printf("\nStarting Can Log %s\n",fileName); // write full timestamp logTS(); + //set_timestamp(file,2012,12,23,11,11,11); fclose(file); + wait(1); } } // if (!logOpen) do {