X-Git-Url: http://git.droids-corp.org/?p=protos%2Fimu.git;a=blobdiff_plain;f=gps_venus.c;fp=gps_venus.c;h=01551a68d2a7529e2521a29d85e253854dbba688;hp=20d8639fb1e44dad2b0086866784fe33d98c021c;hb=849b29b998a8cbc10cd1900d3e5dd1a8488b77f6;hpb=a4e442441be45647f1115a59b7bff452910cf509 diff --git a/gps_venus.c b/gps_venus.c index 20d8639..01551a6 100644 --- a/gps_venus.c +++ b/gps_venus.c @@ -541,15 +541,12 @@ void gps_get_pos(struct gps_pos *pos) int gps_loop(void) { - struct fat_file_struct *fd = NULL; uint32_t ms; uint8_t flags, prio; int16_t len; char buf[128]; struct gps_pos pos; - fd = get_log_file(); - while (1) { IRQ_LOCK(flags); @@ -573,9 +570,9 @@ int gps_loop(void) (double)gps_pos.sea_altitude/100.); - if (fd != NULL) { + if (sd_log_enabled()) { - if (fat_write_file(fd, (unsigned char *)buf, len) != len) { + if (sd_log_write(buf, len) != len) { printf_P(PSTR("error writing to file\n")); return -1; }