diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-23 12:53:20 -0800 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-02-23 12:53:20 -0800 |
commit | e1f60e770948d28ec1152f66b9c3ad57eae0c2e4 (patch) | |
tree | 5c7b63e6931f4af34e766a7620bc82a1025b325e | |
parent | 20618a611b5cd719cab803823b2f3a08d9a498f6 (diff) | |
download | px4-firmware-e1f60e770948d28ec1152f66b9c3ad57eae0c2e4.tar.gz px4-firmware-e1f60e770948d28ec1152f66b9c3ad57eae0c2e4.tar.bz2 px4-firmware-e1f60e770948d28ec1152f66b9c3ad57eae0c2e4.zip |
Code style fixes (authors should be in the doxygen section), using lseek to attempt to work around log corruption
-rw-r--r-- | src/modules/sdlog2/logbuffer.c | 3 | ||||
-rw-r--r-- | src/modules/sdlog2/sdlog2.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/sdlog2/logbuffer.c b/src/modules/sdlog2/logbuffer.c index b3243f7b5..6a29d7e5c 100644 --- a/src/modules/sdlog2/logbuffer.c +++ b/src/modules/sdlog2/logbuffer.c @@ -1,7 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2013 PX4 Development Team. All rights reserved. - * Author: Anton Babushkin <anton.babushkin@me.com> + * Copyright (c) 2013, 2014 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c index c4fafb5a6..16c37459b 100644 --- a/src/modules/sdlog2/sdlog2.c +++ b/src/modules/sdlog2/sdlog2.c @@ -1,8 +1,6 @@ /**************************************************************************** * * Copyright (c) 2012-2014 PX4 Development Team. All rights reserved. - * Author: Lorenz Meier <lm@inf.ethz.ch> - * Anton Babushkin <anton.babushkin@me.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -95,6 +93,7 @@ #define LOGBUFFER_WRITE_AND_COUNT(_msg) if (logbuffer_write(&lb, &log_msg, LOG_PACKET_SIZE(_msg))) { \ log_msgs_written++; \ + } else { \ log_msgs_skipped++; \ } @@ -450,6 +449,7 @@ static void *logwriter_thread(void *arg) n = available; } + lseek(log_fd, 0, SEEK_CUR); n = write(log_fd, read_ptr, n); should_wait = (n == available) && !is_part; |