From 3d2f07e757a5ddae006f74aef23cab82431be030 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 7 Nov 2020 16:57:11 +1100 Subject: [PATCH] Replay: support body frame odometry --- Tools/Replay/LR_MsgHandler.cpp | 5 +++++ Tools/Replay/LR_MsgHandler.h | 6 ++++++ Tools/Replay/LogReader.cpp | 2 ++ 3 files changed, 13 insertions(+) diff --git a/Tools/Replay/LR_MsgHandler.cpp b/Tools/Replay/LR_MsgHandler.cpp index a61ebc1cf2..1a399f906a 100644 --- a/Tools/Replay/LR_MsgHandler.cpp +++ b/Tools/Replay/LR_MsgHandler.cpp @@ -247,6 +247,11 @@ void LR_MsgHandler_RWOH::process_message(uint8_t *msg) AP::dal().handle_message(MSG_CAST(RWOH,msg), ekf2, ekf3); } +void LR_MsgHandler_RBOH::process_message(uint8_t *msg) +{ + AP::dal().handle_message(MSG_CAST(RBOH,msg), ekf2, ekf3); +} + void LR_MsgHandler_REPH::process_message(uint8_t *msg) { AP::dal().handle_message(MSG_CAST(REPH,msg), ekf2, ekf3); diff --git a/Tools/Replay/LR_MsgHandler.h b/Tools/Replay/LR_MsgHandler.h index 4ef3fcebe0..beee21e3a0 100644 --- a/Tools/Replay/LR_MsgHandler.h +++ b/Tools/Replay/LR_MsgHandler.h @@ -106,6 +106,12 @@ class LR_MsgHandler_RWOH : public LR_MsgHandler_EKF void process_message(uint8_t *msg) override; }; +class LR_MsgHandler_RBOH : public LR_MsgHandler_EKF +{ + using LR_MsgHandler_EKF::LR_MsgHandler_EKF; + void process_message(uint8_t *msg) override; +}; + class LR_MsgHandler_RFRN : public LR_MsgHandler { public: diff --git a/Tools/Replay/LogReader.cpp b/Tools/Replay/LogReader.cpp index 3e7e6680c4..8185700b80 100644 --- a/Tools/Replay/LogReader.cpp +++ b/Tools/Replay/LogReader.cpp @@ -228,6 +228,8 @@ bool LogReader::handle_log_format_msg(const struct log_Format &f) msgparser[f.type] = new LR_MsgHandler_REVH(formats[f.type], ekf2, ekf3); } else if (streq(name, "RWOH")) { msgparser[f.type] = new LR_MsgHandler_RWOH(formats[f.type], ekf2, ekf3); + } else if (streq(name, "RBOH")) { + msgparser[f.type] = new LR_MsgHandler_RBOH(formats[f.type], ekf2, ekf3); } else { // debug(" No parser for (%s)\n", name); }