navigator move parameters out of MissionBlock

- MissionBlock is an interface with > 10 implementations
This commit is contained in:
Daniel Agar
2017-10-26 22:43:53 +02:00
committed by Lorenz Meier
parent 8e457b6037
commit 4416c4ddb3
26 changed files with 291 additions and 352 deletions
@@ -460,8 +460,6 @@ FixedwingAttitudeControl::FixedwingAttitudeControl() :
_parameter_handles.rattitude_thres = param_find("FW_RATT_TH");
_parameter_handles.vtol_type = param_find("VT_TYPE");
_parameter_handles.bat_scale_en = param_find("FW_BAT_SCALE_EN");
/* fetch initial parameter values */
@@ -567,7 +565,9 @@ FixedwingAttitudeControl::parameters_update()
param_get(_parameter_handles.rattitude_thres, &_parameters.rattitude_thres);
param_get(_parameter_handles.vtol_type, &_parameters.vtol_type);
if (_vehicle_status.is_vtol) {
param_get(_parameter_handles.vtol_type, &_parameters.vtol_type);
}
param_get(_parameter_handles.bat_scale_en, &_parameters.bat_scale_en);
@@ -676,6 +676,10 @@ FixedwingAttitudeControl::vehicle_status_poll()
_actuators_id = ORB_ID(actuator_controls_virtual_fw);
_attitude_setpoint_id = ORB_ID(fw_virtual_attitude_setpoint);
_parameter_handles.vtol_type = param_find("VT_TYPE");
parameters_update();
} else {
_rates_sp_id = ORB_ID(vehicle_rates_setpoint);
_actuators_id = ORB_ID(actuator_controls_0);