mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-27 23:04:07 +08:00
sdlog2: bug fixed, sleep when idle too
This commit is contained in:
parent
c11e1ee0ab
commit
2ee8cf1cf0
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user