AP_OBC: fixed resume on GPS loss

This commit is contained in:
Andrew Tridgell 2012-09-26 20:15:39 +10:00
parent bbc7f050e5
commit e8c4dedcd7

View File

@ -125,7 +125,7 @@ APM_OBC::check(APM_OBC::control_mode mode,
_state = STATE_GPS_LOSS; _state = STATE_GPS_LOSS;
if (_wp_gps_loss) { if (_wp_gps_loss) {
if (_command_index != NULL) { if (_command_index != NULL) {
_saved_wp = _command_index->get() + 1; _saved_wp = _command_index->get();
} }
change_command(_wp_gps_loss); change_command(_wp_gps_loss);
} }