diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-08-24 17:45:15 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-08-24 17:45:15 +0200 |
commit | 06317046f2da215db328be660f900d265cdf9102 (patch) | |
tree | fa4c78a02537d80ea338cddbefa7c8a3d94d8fa3 /src/modules/navigator/navigator_main.cpp | |
parent | a432d0493c0761da075c7734c0f54f44d6121e78 (diff) | |
download | px4-firmware-06317046f2da215db328be660f900d265cdf9102.tar.gz px4-firmware-06317046f2da215db328be660f900d265cdf9102.tar.bz2 px4-firmware-06317046f2da215db328be660f900d265cdf9102.zip |
move flight termination and geofence flags from setpoint triplet to mission result
Diffstat (limited to 'src/modules/navigator/navigator_main.cpp')
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 81ceaaca2..c173ecd50 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -395,11 +395,9 @@ Navigator::task_main() if (have_geofence_position_data) { bool inside = _geofence.inside(_global_pos, _gps_pos, _sensor_combined.baro_alt_meter); if (!inside) { - /* inform other apps via the sp triplet */ - _pos_sp_triplet.geofence_violated = true; - if (_pos_sp_triplet.geofence_violated != true) { - _pos_sp_triplet_updated = true; - } + /* inform other apps via the mission result */ + _mission_result.geofence_violated = true; + publish_mission_result(); /* Issue a warning about the geofence violation once */ if (!_geofence_violation_warning_sent) { @@ -407,11 +405,9 @@ Navigator::task_main() _geofence_violation_warning_sent = true; } } else { - /* inform other apps via the sp triplet */ - _pos_sp_triplet.geofence_violated = false; - if (_pos_sp_triplet.geofence_violated != false) { - _pos_sp_triplet_updated = true; - } + /* inform other apps via the mission result */ + _mission_result.geofence_violated = false; + publish_mission_result(); /* Reset the _geofence_violation_warning_sent field */ _geofence_violation_warning_sent = false; } |