APM_OBC: removed use of extern function

This commit is contained in:
Andrew Tridgell 2014-08-17 09:07:38 +10:00
parent d130f0c499
commit 4e97c98fa1
2 changed files with 3 additions and 6 deletions

View File

@ -102,19 +102,16 @@ const AP_Param::GroupInfo APM_OBC::var_info[] PROGMEM = {
AP_GROUPEND
};
// access to geofence state
extern bool geofence_breached(void);
// check for Failsafe conditions. This is called at 10Hz by the main
// ArduPlane code
void
APM_OBC::check(APM_OBC::control_mode mode, uint32_t last_heartbeat_ms)
APM_OBC::check(APM_OBC::control_mode mode, uint32_t last_heartbeat_ms, bool geofence_breached)
{
if (!_enable) {
return;
}
// we always check for fence breach
if (geofence_breached() || check_altlimit()) {
if (geofence_breached || check_altlimit()) {
if (!_terminate) {
GCS_MAVLINK::send_statustext_all(PSTR("Fence TERMINATE"));
_terminate.set(1);

View File

@ -62,7 +62,7 @@ public:
_saved_wp = 0;
}
void check(enum control_mode control_mode, uint32_t last_heartbeat_ms);
void check(enum control_mode control_mode, uint32_t last_heartbeat_ms, bool geofence_breached);
// called in servo output code to set servos to crash position if needed
void check_crash_plane(void);