From bde5cadba7cbf1739e1c409773f9d8ff4bd24a59 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 2 Nov 2020 19:48:01 -0500 Subject: [PATCH] ROMFS: replay automatically create replay_params.txt --- ROMFS/px4fmu_common/init.d-posix/rc.replay | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ROMFS/px4fmu_common/init.d-posix/rc.replay b/ROMFS/px4fmu_common/init.d-posix/rc.replay index f4f0f210f8..25a9612197 100644 --- a/ROMFS/px4fmu_common/init.d-posix/rc.replay +++ b/ROMFS/px4fmu_common/init.d-posix/rc.replay @@ -2,6 +2,17 @@ # EKF2 replay script +# shellcheck disable=SC2154 +if [ ! -f ${replay} ]; then + echo "Invalid replay log file ${replay}" + exit 1 +fi + +if [ ! -f replay_params.txt ]; then + echo "Creating $(pwd)/replay_params.txt" + ulog_params -i "${replay}" -d ' ' | grep -e '^EKF2' > replay_params.txt +fi + publisher_rules_file="orb_publisher.rules" cat < "$publisher_rules_file" restrict_topics: sensor_combined, vehicle_gps_position, vehicle_land_detected