mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 03:23:34 +08:00
replay: close replay log file after replay is finished, then exit (#11264)
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include <px4_posix.h>
|
||||
#include <px4_tasks.h>
|
||||
#include <px4_time.h>
|
||||
#include <px4_shutdown.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <float.h>
|
||||
@@ -847,7 +848,9 @@ void Replay::run()
|
||||
PX4_INFO("Replay done (published %u msgs, %.3lf s)", nr_published_messages,
|
||||
(double)hrt_elapsed_time(&_replay_start_time) / 1.e6);
|
||||
|
||||
//TODO: should we close the log file & exit (optionally, by adding a parameter -q) ?
|
||||
//TODO: add parameter -q?
|
||||
replay_file.close();
|
||||
px4_shutdown_request(false, false);
|
||||
}
|
||||
|
||||
onExitMainLoop();
|
||||
|
||||
@@ -32,4 +32,4 @@
|
||||
############################################################################
|
||||
|
||||
px4_add_library(drivers__ledsim led.cpp)
|
||||
target_link_libraries(drivers__ledsim PRIVATE drivers__led drivers_board)
|
||||
target_link_libraries(drivers__ledsim PRIVATE drivers__led)
|
||||
|
||||
Reference in New Issue
Block a user