aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-09-20 09:45:22 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-09-22 10:55:02 +0200
commit5a0e0d041229700d2ae9c14e4ab2798d34fff14c (patch)
treece7110753d6b6c3047645b69ba6eb1d9cca066aa
parentc7966d56f5457be2eab4d6ee9cfadb7c3f22674b (diff)
downloadpx4-firmware-5a0e0d041229700d2ae9c14e4ab2798d34fff14c.tar.gz
px4-firmware-5a0e0d041229700d2ae9c14e4ab2798d34fff14c.tar.bz2
px4-firmware-5a0e0d041229700d2ae9c14e4ab2798d34fff14c.zip
navigator: fix status information, remove fence_valid flag (this is handled by the geofence class)
-rw-r--r--src/modules/navigator/navigator.h1
-rw-r--r--src/modules/navigator/navigator_main.cpp5
2 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/navigator/navigator.h b/src/modules/navigator/navigator.h
index 840b43f1b..bf42acff9 100644
--- a/src/modules/navigator/navigator.h
+++ b/src/modules/navigator/navigator.h
@@ -191,7 +191,6 @@ private:
Geofence _geofence; /**< class that handles the geofence */
bool _geofence_violation_warning_sent; /**< prevents spaming to mavlink */
- bool _fence_valid; /**< flag if fence is valid */
bool _inside_fence; /**< vehicle is inside fence */
NavigatorMode *_navigation_mode; /**< abstract pointer to current navigation mode class */
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp
index 4f92954fd..b63394544 100644
--- a/src/modules/navigator/navigator_main.cpp
+++ b/src/modules/navigator/navigator_main.cpp
@@ -127,7 +127,6 @@ Navigator::Navigator() :
_loop_perf(perf_alloc(PC_ELAPSED, "navigator")),
_geofence{},
_geofence_violation_warning_sent(false),
- _fence_valid(false),
_inside_fence(true),
_navigation_mode(nullptr),
_mission(this, "MIS"),
@@ -536,7 +535,7 @@ Navigator::status()
// warnx("Compass heading in degrees %5.5f", (double)(_global_pos.yaw * M_RAD_TO_DEG_F));
// }
- if (_fence_valid) {
+ if (_geofence.valid()) {
warnx("Geofence is valid");
/* TODO: needed? */
// warnx("Vertex longitude latitude");
@@ -544,7 +543,7 @@ Navigator::status()
// warnx("%6u %9.5f %8.5f", i, (double)_fence.vertices[i].lon, (double)_fence.vertices[i].lat);
} else {
- warnx("Geofence not set");
+ warnx("Geofence not set (no /etc/geofence.txt on microsd) or not valid");
}
}