# HG changeset patch # User ethanzonca@CL-ENS241-08.cedarville.edu # Date 2013-01-16 22:56:20 # Node ID b68fde48a3b774d9dd0b048484fd63fd05c6814a # Parent 83633fbb38d0d6c92042d1a35b53d0adbeed7090 Fixed SD card logging (broken from previous commit) diff --git a/master/master/lib/logger.c b/master/master/lib/logger.c --- a/master/master/lib/logger.c +++ b/master/master/lib/logger.c @@ -89,7 +89,7 @@ void logger_setup() sprintf(filename, "data%d.csv",++logid); // TODO: Catch errors here - if(!fat_create_file(dd, filename, &directory)) { + if(fat_create_file(dd, filename, &directory) == 0) { led_errorcode(ERROR_SD_FILE); } diff --git a/master/master/master.c b/master/master/master.c --- a/master/master/master.c +++ b/master/master/master.c @@ -76,7 +76,7 @@ int main(void) int parseResult = PARSERESULT_NODATA; // Write CSV header to SD card - //logger_log("ProgramTime,LastAprsBroadcast,LastLog\n"); + logger_log("ProgramTime,LastAprsBroadcast,LastLog\n"); uint8_t ctr = 0; void spin() {