replay: close replay log file after replay is finished, then exit (#11264)

This commit is contained in:
roangel
2019-08-28 08:13:50 +02:00
committed by Beat Küng
parent a20b508d7e
commit e50dd7c364
6 changed files with 61 additions and 4 deletions
+4 -1
View File
@@ -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();
+1 -1
View File
@@ -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)