navigator remove FW and MC cruise parameters

This commit is contained in:
Daniel Agar 2017-04-21 11:35:34 -04:00 committed by Lorenz Meier
parent 0106840b87
commit 1fd343b5cc
2 changed files with 4 additions and 10 deletions

View File

@ -291,14 +291,11 @@ private:
NavigatorMode *_navigation_mode_array[NAVIGATOR_MODE_ARRAY_SIZE]; /**< array of navigation modes */
control::BlockParamFloat _param_loiter_radius; /**< loiter radius for fixedwing */
control::BlockParamFloat _param_acceptance_radius; /**< acceptance for takeoff */
control::BlockParamFloat _param_fw_alt_acceptance_radius; /**< acceptance radius for fixedwing altitude */
control::BlockParamFloat _param_mc_alt_acceptance_radius; /**< acceptance radius for multicopter altitude */
control::BlockParamFloat _param_cruising_speed_hover;
control::BlockParamFloat _param_cruising_speed_plane;
control::BlockParamFloat _param_cruising_throttle_plane;
float _mission_cruising_speed_mc{-1.0f};
float _mission_cruising_speed_fw{-1.0f};
float _mission_throttle{-1.0f};

View File

@ -99,10 +99,7 @@ Navigator::Navigator() :
_param_loiter_radius(this, "LOITER_RAD"),
_param_acceptance_radius(this, "ACC_RAD"),
_param_fw_alt_acceptance_radius(this, "FW_ALT_RAD"),
_param_mc_alt_acceptance_radius(this, "MC_ALT_RAD"),
_param_cruising_speed_hover(this, "MPC_XY_CRUISE", false),
_param_cruising_speed_plane(this, "FW_AIRSPD_TRIM", false),
_param_cruising_throttle_plane(this, "FW_THR_CRUISE", false)
_param_mc_alt_acceptance_radius(this, "MC_ALT_RAD")
{
/* Create a list of our possible navigation types */
_navigation_mode_array[0] = &_mission;
@ -745,7 +742,7 @@ Navigator::get_cruising_speed()
return _mission_cruising_speed_mc;
} else {
return _param_cruising_speed_hover.get();
return -1.0f;
}
} else {
@ -753,7 +750,7 @@ Navigator::get_cruising_speed()
return _mission_cruising_speed_fw;
} else {
return _param_cruising_speed_plane.get();
return -1.0f;
}
}
}