geofence: don't trim control surfaces on geo-fence breach

the user input is likely to be bad
This commit is contained in:
Andrew Tridgell 2011-12-15 23:42:54 +11:00
parent 1b64185b18
commit a6e451c1b2

View File

@ -204,6 +204,12 @@ static void geofence_check(void)
guided_WP.options = 0;
guided_WP.lat = geofence_state->boundary[0].x * 1.0e7;
guided_WP.lng = geofence_state->boundary[0].y * 1.0e7;
if (control_mode == MANUAL && g.auto_trim) {
// make sure we don't auto trim the surfaces on this change
control_mode = STABILIZE;
}
set_mode(GUIDED);
break;
}