aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2015-01-04 16:24:02 +0100
committerLorenz Meier <lm@inf.ethz.ch>2015-01-04 16:24:02 +0100
commit0d103dcb383f29d77753ee1e7ab49cc7a0f76fb3 (patch)
tree76ec2314a405bc750ea3e07e5276077165754224 /src
parent1f181fb03f5eb467d5e1f0933164363269986844 (diff)
downloadpx4-firmware-0d103dcb383f29d77753ee1e7ab49cc7a0f76fb3.tar.gz
px4-firmware-0d103dcb383f29d77753ee1e7ab49cc7a0f76fb3.tar.bz2
px4-firmware-0d103dcb383f29d77753ee1e7ab49cc7a0f76fb3.zip
sdlog2: Use correct struct
Diffstat (limited to 'src')
-rw-r--r--src/modules/sdlog2/sdlog2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c
index 10b6c903f..c3952b77d 100644
--- a/src/modules/sdlog2/sdlog2.c
+++ b/src/modules/sdlog2/sdlog2.c
@@ -57,6 +57,7 @@
#include <unistd.h>
#include <drivers/drv_hrt.h>
#include <math.h>
+#include <time.h>
#include <drivers/drv_range_finder.h>
@@ -340,7 +341,7 @@ int create_log_dir()
uint16_t dir_number = 1; // start with dir sess001
int mkdir_ret;
- timespec ts;
+ struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
/* use RTC time for log file naming, e.g. /fs/microsd/2014-01-19/19_37_52.bin */
time_t utc_time_sec = ts.tv_sec + (ts.tv_nsec / 1e9);
@@ -400,7 +401,7 @@ int open_log_file()
char log_file_name[32] = "";
char log_file_path[64] = "";
- timespec ts;
+ struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
/* use RTC time for log file naming, e.g. /fs/microsd/2014-01-19/19_37_52.bin */
time_t utc_time_sec = ts.tv_sec + (ts.tv_nsec / 1e9);
@@ -455,7 +456,7 @@ int open_perf_file(const char* str)
char log_file_name[32] = "";
char log_file_path[64] = "";
- timespec ts;
+ struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
/* use RTC time for log file naming, e.g. /fs/microsd/2014-01-19/19_37_52.bin */
time_t utc_time_sec = ts.tv_sec + (ts.tv_nsec / 1e9);