Plane: update for APM_OBC API change

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

View File

@ -975,7 +975,7 @@ static void obc_fs_check(void)
{
#if OBC_FAILSAFE == ENABLED
// perform OBC failsafe checks
obc.check(OBC_MODE(control_mode), failsafe.last_heartbeat_ms);
obc.check(OBC_MODE(control_mode), failsafe.last_heartbeat_ms, geofence_breached());
#endif
}

View File

@ -424,8 +424,10 @@ static void geofence_send_status(mavlink_channel_t chan)
}
}
// public function for use in failsafe modules
bool geofence_breached(void)
/*
return true if geofence has been breached
*/
static bool geofence_breached(void)
{
return geofence_state ? geofence_state->fence_triggered : false;
}