forked from Archive/PX4-Autopilot
Mixer test: Support channel reversal
This commit is contained in:
parent
a1232083fc
commit
30cd3e1d79
|
@ -78,6 +78,7 @@ int test_mixer(int argc, char *argv[])
|
||||||
uint16_t r_page_servo_control_max[output_max];
|
uint16_t r_page_servo_control_max[output_max];
|
||||||
uint16_t r_page_servos[output_max];
|
uint16_t r_page_servos[output_max];
|
||||||
uint16_t servo_predicted[output_max];
|
uint16_t servo_predicted[output_max];
|
||||||
|
int16_t reverse_pwm_mask = 0;
|
||||||
|
|
||||||
warnx("testing mixer");
|
warnx("testing mixer");
|
||||||
|
|
||||||
|
@ -204,8 +205,8 @@ int test_mixer(int argc, char *argv[])
|
||||||
/* mix */
|
/* mix */
|
||||||
mixed = mixer_group.mix(&outputs[0], output_max, NULL);
|
mixed = mixer_group.mix(&outputs[0], output_max, NULL);
|
||||||
|
|
||||||
pwm_limit_calc(should_arm, mixed, r_page_servo_disarmed, r_page_servo_control_min, r_page_servo_control_max, outputs,
|
pwm_limit_calc(should_arm, mixed, reverse_pwm_mask, r_page_servo_disarmed, r_page_servo_control_min,
|
||||||
r_page_servos, &pwm_limit);
|
r_page_servo_control_max, outputs, r_page_servos, &pwm_limit);
|
||||||
|
|
||||||
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
||||||
for (unsigned i = 0; i < mixed; i++) {
|
for (unsigned i = 0; i < mixed; i++) {
|
||||||
|
@ -250,7 +251,7 @@ int test_mixer(int argc, char *argv[])
|
||||||
/* mix */
|
/* mix */
|
||||||
mixed = mixer_group.mix(&outputs[0], output_max, NULL);
|
mixed = mixer_group.mix(&outputs[0], output_max, NULL);
|
||||||
|
|
||||||
pwm_limit_calc(should_arm, mixed, r_page_servo_disarmed, r_page_servo_control_min, r_page_servo_control_max, outputs,
|
pwm_limit_calc(should_arm, mixed, reverse_pwm_mask, r_page_servo_disarmed, r_page_servo_control_min, r_page_servo_control_max, outputs,
|
||||||
r_page_servos, &pwm_limit);
|
r_page_servos, &pwm_limit);
|
||||||
|
|
||||||
warnx("mixed %d outputs (max %d)", mixed, output_max);
|
warnx("mixed %d outputs (max %d)", mixed, output_max);
|
||||||
|
@ -277,7 +278,7 @@ int test_mixer(int argc, char *argv[])
|
||||||
/* mix */
|
/* mix */
|
||||||
mixed = mixer_group.mix(&outputs[0], output_max, NULL);
|
mixed = mixer_group.mix(&outputs[0], output_max, NULL);
|
||||||
|
|
||||||
pwm_limit_calc(should_arm, mixed, r_page_servo_disarmed, r_page_servo_control_min, r_page_servo_control_max, outputs,
|
pwm_limit_calc(should_arm, mixed, reverse_pwm_mask, r_page_servo_disarmed, r_page_servo_control_min, r_page_servo_control_max, outputs,
|
||||||
r_page_servos, &pwm_limit);
|
r_page_servos, &pwm_limit);
|
||||||
|
|
||||||
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
||||||
|
@ -313,7 +314,7 @@ int test_mixer(int argc, char *argv[])
|
||||||
/* mix */
|
/* mix */
|
||||||
mixed = mixer_group.mix(&outputs[0], output_max, NULL);
|
mixed = mixer_group.mix(&outputs[0], output_max, NULL);
|
||||||
|
|
||||||
pwm_limit_calc(should_arm, mixed, r_page_servo_disarmed, r_page_servo_control_min, r_page_servo_control_max, outputs,
|
pwm_limit_calc(should_arm, mixed, reverse_pwm_mask, r_page_servo_disarmed, r_page_servo_control_min, r_page_servo_control_max, outputs,
|
||||||
r_page_servos, &pwm_limit);
|
r_page_servos, &pwm_limit);
|
||||||
|
|
||||||
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
||||||
|
|
Loading…
Reference in New Issue