UAVCAN driver: support throttle linearization (THR_MLD_FAC parameter)

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
Roman Bapst
2019-07-09 15:10:54 -04:00
committed by Daniel Agar
parent 2aa05e3914
commit b54a43fccc
4 changed files with 15 additions and 6 deletions
+7
View File
@@ -425,6 +425,12 @@ void UavcanNode::update_params()
if (param_handle != PARAM_INVALID) {
param_get(param_handle, &_airmode);
}
param_handle = param_find("THR_MDL_FAC");
if (param_handle != PARAM_INVALID) {
param_get(param_handle, &_thr_mdl_factor);
}
}
int UavcanNode::start_fw_server()
@@ -905,6 +911,7 @@ int UavcanNode::run()
// but this driver could well serve multiple groups.
unsigned num_outputs_max = 8;
_mixers->set_thrust_factor(_thr_mdl_factor);
_mixers->set_airmode(_airmode);
// Do mixing