GeoFence: fixed default return altitude units

off by 100x!
This commit is contained in:
Andrew Tridgell 2012-07-05 15:04:42 +10:00
parent 2010d3aaa3
commit 21f06f8a39
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ static void geofence_check(bool altitude_check_only)
// min and max // min and max
if (g.fence_minalt >= g.fence_maxalt) { if (g.fence_minalt >= g.fence_maxalt) {
// invalid min/max, use RTL_altitude // invalid min/max, use RTL_altitude
guided_WP.alt = home.alt + (g.RTL_altitude * 100); guided_WP.alt = home.alt + g.RTL_altitude;
} else { } else {
guided_WP.alt = home.alt + 100*(g.fence_minalt + g.fence_maxalt)/2; guided_WP.alt = home.alt + 100*(g.fence_minalt + g.fence_maxalt)/2;
} }