navigator: remove dependency on vtol module by using the C param API

This is the quickest way to achieve the desired result.
Long-term we might do something else.
This commit is contained in:
Beat Küng
2018-10-23 12:02:56 +02:00
parent ee5c18a737
commit 86673ecfcb
2 changed files with 19 additions and 7 deletions

View File

@@ -110,6 +110,9 @@ Navigator::Navigator() :
_navigation_mode_array[8] = &_land;
_navigation_mode_array[9] = &_precland;
_navigation_mode_array[10] = &_follow_target;
_handle_back_trans_dec_mss = param_find("VT_B_DEC_MSS");
_handle_reverse_delay = param_find("VT_B_REV_DEL");
}
void
@@ -162,6 +165,14 @@ Navigator::params_update()
parameter_update_s param_update;
orb_copy(ORB_ID(parameter_update), _param_update_sub, &param_update);
updateParams();
if (_handle_back_trans_dec_mss != PARAM_INVALID) {
param_get(_handle_back_trans_dec_mss, &_param_back_trans_dec_mss);
}
if (_handle_reverse_delay != PARAM_INVALID) {
param_get(_handle_reverse_delay, &_param_reverse_delay);
}
}
void