2016-08-17 01:28:16 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_Arming/AP_Arming.h>
|
2017-08-16 07:02:56 -03:00
|
|
|
#include <AC_Fence/AC_Fence.h>
|
2016-08-17 01:28:16 -03:00
|
|
|
|
|
|
|
/*
|
|
|
|
a rover-specific arming class
|
|
|
|
*/
|
|
|
|
class AP_Arming_Rover : public AP_Arming
|
|
|
|
{
|
|
|
|
public:
|
2017-12-12 21:06:15 -04:00
|
|
|
AP_Arming_Rover(const AP_AHRS &ahrs_ref, const AP_Baro &baro, Compass &compass,
|
2017-08-16 07:02:56 -03:00
|
|
|
const AP_BattMonitor &battery, const AC_Fence &fence)
|
|
|
|
: AP_Arming(ahrs_ref, baro, compass, battery),
|
|
|
|
_fence(fence)
|
2017-12-12 21:06:15 -04:00
|
|
|
{
|
2016-08-17 01:28:16 -03:00
|
|
|
}
|
|
|
|
|
2017-08-30 17:25:42 -03:00
|
|
|
/* Do not allow copies */
|
|
|
|
AP_Arming_Rover(const AP_Arming_Rover &other) = delete;
|
|
|
|
AP_Arming_Rover &operator=(const AP_Baro&) = delete;
|
|
|
|
|
2017-12-09 02:54:47 -04:00
|
|
|
bool pre_arm_checks(bool report) override;
|
2017-06-30 15:48:35 -03:00
|
|
|
bool pre_arm_rc_checks(const bool display_failure);
|
2017-11-29 02:30:37 -04:00
|
|
|
bool gps_checks(bool display_failure) override;
|
2017-06-30 15:48:35 -03:00
|
|
|
|
2016-08-17 01:28:16 -03:00
|
|
|
protected:
|
|
|
|
enum HomeState home_status() const override;
|
2017-08-16 07:02:56 -03:00
|
|
|
bool fence_checks(bool report);
|
2017-08-16 07:57:42 -03:00
|
|
|
bool proximity_check(bool report);
|
2017-08-16 07:02:56 -03:00
|
|
|
|
|
|
|
private:
|
|
|
|
const AC_Fence& _fence;
|
2016-08-17 01:28:16 -03:00
|
|
|
};
|