mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 00:41:35 +08:00
Navigator: Update to new sensors combined topic
This commit is contained in:
@@ -406,7 +406,7 @@ Navigator::task_main()
|
|||||||
/* Check geofence violation */
|
/* Check geofence violation */
|
||||||
static hrt_abstime last_geofence_check = 0;
|
static hrt_abstime last_geofence_check = 0;
|
||||||
if (have_geofence_position_data && hrt_elapsed_time(&last_geofence_check) > GEOFENCE_CHECK_INTERVAL) {
|
if (have_geofence_position_data && hrt_elapsed_time(&last_geofence_check) > GEOFENCE_CHECK_INTERVAL) {
|
||||||
bool inside = _geofence.inside(_global_pos, _gps_pos, _sensor_combined.baro_alt_meter, _home_pos, _home_position_set);
|
bool inside = _geofence.inside(_global_pos, _gps_pos, _sensor_combined.baro_alt_meter[0], _home_pos, _home_position_set);
|
||||||
last_geofence_check = hrt_absolute_time();
|
last_geofence_check = hrt_absolute_time();
|
||||||
have_geofence_position_data = false;
|
have_geofence_position_data = false;
|
||||||
if (!inside) {
|
if (!inside) {
|
||||||
|
|||||||
Reference in New Issue
Block a user