aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-03-07 23:28:38 +0400
committerAnton Babushkin <anton.babushkin@me.com>2014-03-07 23:28:38 +0400
commit2ee8cf1cf08095693b168238a311b1caf8df1701 (patch)
treec21315a5ec43b269d6a9b4843b6b13b6c2107de5 /src/modules
parentc11e1ee0ab8579826ed73b1f596e0535156bbce4 (diff)
downloadpx4-firmware-2ee8cf1cf08095693b168238a311b1caf8df1701.tar.gz
px4-firmware-2ee8cf1cf08095693b168238a311b1caf8df1701.tar.bz2
px4-firmware-2ee8cf1cf08095693b168238a311b1caf8df1701.zip
sdlog2: bug fixed, sleep when idle too
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/sdlog2/sdlog2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/sdlog2/sdlog2.c b/src/modules/sdlog2/sdlog2.c
index 200d70e93..58890322b 100644
--- a/src/modules/sdlog2/sdlog2.c
+++ b/src/modules/sdlog2/sdlog2.c
@@ -893,6 +893,8 @@ int sdlog2_thread_main(int argc, char *argv[])
}
while (!main_thread_should_exit) {
+ usleep(sleep_delay);
+
/* --- VEHICLE COMMAND - LOG MANAGEMENT --- */
if (copy_if_updated(ORB_ID(vehicle_command), subs.cmd_sub, &buf.cmd)) {
handle_command(&buf.cmd);
@@ -1222,8 +1224,6 @@ int sdlog2_thread_main(int argc, char *argv[])
/* unlock, now the writer thread may run */
pthread_mutex_unlock(&logbuffer_mutex);
-
- usleep(sleep_delay);
}
if (logging_enabled) {