AP_Arming: move logging of armed/disarm events into AP_Arming base class

This commit is contained in:
Peter Barker 2020-01-08 14:51:57 +11:00 committed by Andrew Tridgell
parent a74d754720
commit 62c0078d5f

View File

@ -1012,6 +1012,7 @@ void AP_Arming::Log_Write_Arm(const bool forced, const AP_Arming::Method method)
method : (uint8_t)method,
};
AP::logger().WriteCriticalBlock(&pkt, sizeof(pkt));
AP::logger().Write_Event(LogEvent::ARMED);
}
void AP_Arming::Log_Write_Disarm()
@ -1025,6 +1026,7 @@ void AP_Arming::Log_Write_Disarm()
method : 0
};
AP::logger().WriteCriticalBlock(&pkt, sizeof(pkt));
AP::logger().Write_Event(LogEvent::DISARMED);
}
AP_Arming *AP_Arming::_singleton = nullptr;