From b8cbd64c861ef4c921cc5ba5622ef4b83d5b8ab7 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 25 Oct 2019 17:08:28 +1100 Subject: [PATCH] Tools: Replay: use Event enumeration from Logger header --- Tools/Replay/LR_MsgHandler.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Tools/Replay/LR_MsgHandler.cpp b/Tools/Replay/LR_MsgHandler.cpp index e5b0a49809..2e6274011a 100644 --- a/Tools/Replay/LR_MsgHandler.cpp +++ b/Tools/Replay/LR_MsgHandler.cpp @@ -116,17 +116,14 @@ void LR_MsgHandler_BARO::process_message(uint8_t *msg) } -#define DATA_ARMED 10 -#define DATA_DISARMED 11 - void LR_MsgHandler_Event::process_message(uint8_t *msg) { uint8_t id = require_field_uint8_t(msg, "Id"); - if (id == DATA_ARMED) { + if ((LogEvent)id == LogEvent::ARMED) { hal.util->set_soft_armed(true); printf("Armed at %lu\n", (unsigned long)AP_HAL::millis()); - } else if (id == DATA_DISARMED) { + } else if ((LogEvent)id == LogEvent::DISARMED) { hal.util->set_soft_armed(false); printf("Disarmed at %lu\n", (unsigned long)AP_HAL::millis());