diff --git a/APMrover2/AP_Arming.cpp b/APMrover2/AP_Arming.cpp new file mode 100644 index 0000000000..c786548131 --- /dev/null +++ b/APMrover2/AP_Arming.cpp @@ -0,0 +1,7 @@ +#include "AP_Arming.h" +#include "Rover.h" + +enum HomeState AP_Arming_Rover::home_status() const +{ + return rover.home_is_set; +} diff --git a/APMrover2/AP_Arming.h b/APMrover2/AP_Arming.h new file mode 100644 index 0000000000..8037252359 --- /dev/null +++ b/APMrover2/AP_Arming.h @@ -0,0 +1,21 @@ +#pragma once + +#include + +/* + a rover-specific arming class + */ +class AP_Arming_Rover : public AP_Arming +{ +public: + + AP_Arming_Rover(const AP_AHRS &ahrs_ref, const AP_Baro &baro, Compass &compass, + const AP_BattMonitor &battery) : + AP_Arming(ahrs_ref, baro, compass, battery) { + } + +protected: + + enum HomeState home_status() const override; +}; + diff --git a/APMrover2/Rover.h b/APMrover2/Rover.h index 36e5c35b3f..e07168d5ba 100644 --- a/APMrover2/Rover.h +++ b/APMrover2/Rover.h @@ -63,7 +63,7 @@ #include #include -#include +#include "AP_Arming.h" #include "compat.h" #include // Notify library @@ -93,7 +93,7 @@ public: friend class GCS_MAVLINK_Rover; friend class Parameters; friend class ParametersG2; - friend class AP_Arming; + friend class AP_Arming_Rover; Rover(void); @@ -152,7 +152,7 @@ private: #endif // Arming/Disarming management class - AP_Arming arming {ahrs, barometer, compass, battery, home_is_set}; + AP_Arming_Rover arming {ahrs, barometer, compass, battery}; AP_L1_Control L1_controller;