geofence: make some functions private, correctly update params

This commit is contained in:
Thomas Gubler
2014-08-24 15:27:31 +02:00
parent c0975af375
commit bdccd69030
3 changed files with 7 additions and 4 deletions
+2
View File
@@ -91,6 +91,8 @@ bool Geofence::inside(const struct vehicle_global_position_s &global_position, f
bool Geofence::inside(const struct vehicle_global_position_s &global_position,
const struct vehicle_gps_position_s &gps_position,float baro_altitude_amsl) {
updateParams();
if (getAltitudeMode() == Geofence::GF_ALT_MODE_WGS84) {
if (getSource() == Geofence::GF_SOURCE_GLOBALPOS) {
return inside(global_position);