Tools: Replay: use Event enumeration from Logger header

This commit is contained in:
Peter Barker 2019-10-25 17:08:28 +11:00 committed by Randy Mackay
parent 3819366a9e
commit b8cbd64c86
1 changed files with 2 additions and 5 deletions

View File

@ -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());