implemented mapping between desired thrust and applied pwm in

multirotor mixer.

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman
2016-12-15 23:39:53 +01:00
committed by Lorenz Meier
parent 22733b1501
commit d221313dfb
9 changed files with 95 additions and 3 deletions
+12
View File
@@ -248,7 +248,13 @@ mixer_tick(void)
}
/* mix */
/* update parameter for mc thrust model if it updated */
if (update_mc_thrust_param) {
mixer_group.set_thrust_factor(REG_TO_FLOAT(r_setup_thr_fac));
update_mc_thrust_param = false;
}
/* mix */
/* poor mans mutex */
in_mixer = true;
mixed = mixer_group.mix(&outputs[0], PX4IO_SERVO_COUNT, &r_mixer_limits);
@@ -536,6 +542,12 @@ mixer_set_failsafe()
mixer_group.set_max_delta_out_once(delta_out_max);
}
/* update parameter for mc thrust model if it updated */
if (update_mc_thrust_param) {
mixer_group.set_thrust_factor(REG_TO_FLOAT(r_setup_thr_fac));
update_mc_thrust_param = false;
}
/* mix */
mixed = mixer_group.mix(&outputs[0], PX4IO_SERVO_COUNT, &r_mixer_limits);