Browse Source

Tools: Replay: use Event enumeration from Logger header

c415-sdk
Peter Barker 5 years ago committed by Randy Mackay
parent
commit
b8cbd64c86
  1. 7
      Tools/Replay/LR_MsgHandler.cpp

7
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) void LR_MsgHandler_Event::process_message(uint8_t *msg)
{ {
uint8_t id = require_field_uint8_t(msg, "Id"); uint8_t id = require_field_uint8_t(msg, "Id");
if (id == DATA_ARMED) { if ((LogEvent)id == LogEvent::ARMED) {
hal.util->set_soft_armed(true); hal.util->set_soft_armed(true);
printf("Armed at %lu\n", printf("Armed at %lu\n",
(unsigned long)AP_HAL::millis()); (unsigned long)AP_HAL::millis());
} else if (id == DATA_DISARMED) { } else if ((LogEvent)id == LogEvent::DISARMED) {
hal.util->set_soft_armed(false); hal.util->set_soft_armed(false);
printf("Disarmed at %lu\n", printf("Disarmed at %lu\n",
(unsigned long)AP_HAL::millis()); (unsigned long)AP_HAL::millis());

Loading…
Cancel
Save