forked from Archive/PX4-Autopilot
mixer_test be less verbose so we can see the failure
This commit is contained in:
parent
c82e7d6ae9
commit
20ec9965ea
|
@ -144,7 +144,7 @@ int test_mixer(int argc, char *argv[])
|
|||
|
||||
while (transmitted < loaded) {
|
||||
|
||||
unsigned text_length = (loaded - transmitted > chunk_size) ? chunk_size : loaded - transmitted;
|
||||
unsigned text_length = (loaded - transmitted > chunk_size) ? chunk_size : loaded - transmitted;
|
||||
|
||||
/* check for overflow - this would be really fatal */
|
||||
if ((mixer_text_length + text_length + 1) > sizeof(mixer_text)) {
|
||||
|
@ -209,7 +209,7 @@ int test_mixer(int argc, char *argv[])
|
|||
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
||||
for (unsigned i = 0; i < mixed; i++) {
|
||||
|
||||
warnx("pre-arm:\t %d: out: %8.4f, servo: %d", i, (double)outputs[i], (int)r_page_servos[i]);
|
||||
fprintf(stderr, "pre-arm:\t %d: out: %8.4f, servo: %d \n", i, (double)outputs[i], (int)r_page_servos[i]);
|
||||
|
||||
if (i != actuator_controls_s::INDEX_THROTTLE) {
|
||||
if (r_page_servos[i] < r_page_servo_control_min[i]) {
|
||||
|
@ -250,7 +250,7 @@ int test_mixer(int argc, char *argv[])
|
|||
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
||||
for (unsigned i = 0; i < mixed; i++) {
|
||||
|
||||
warnx("ramp:\t %d: out: %8.4f, servo: %d", i, (double)outputs[i], (int)r_page_servos[i]);
|
||||
fprintf(stderr, "ramp:\t %d: out: %8.4f, servo: %d \n", i, (double)outputs[i], (int)r_page_servos[i]);
|
||||
|
||||
/* check mixed outputs to be zero during init phase */
|
||||
if (hrt_elapsed_time(&starttime) < INIT_TIME_US &&
|
||||
|
@ -298,7 +298,7 @@ int test_mixer(int argc, char *argv[])
|
|||
servo_predicted[i] = 1500 + outputs[i] * (r_page_servo_control_max[i] - r_page_servo_control_min[i]) / 2.0f;
|
||||
|
||||
if (abs(servo_predicted[i] - r_page_servos[i]) > 2) {
|
||||
printf("\t %d: %8.4f predicted: %d, servo: %d\n", i, (double)outputs[i], servo_predicted[i], (int)r_page_servos[i]);
|
||||
fprintf(stderr, "\t %d: %8.4f predicted: %d, servo: %d\n", i, (double)outputs[i], servo_predicted[i], (int)r_page_servos[i]);
|
||||
PX4_ERR("mixer violated predicted value");
|
||||
return 1;
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ int test_mixer(int argc, char *argv[])
|
|||
//warnx("mixed %d outputs (max %d), values:", mixed, output_max);
|
||||
for (unsigned i = 0; i < mixed; i++) {
|
||||
|
||||
warnx("disarmed:\t %d: out: %8.4f, servo: %d", i, (double)outputs[i], (int)r_page_servos[i]);
|
||||
fprintf(stderr, "disarmed:\t %d: out: %8.4f, servo: %d \n", i, (double)outputs[i], (int)r_page_servos[i]);
|
||||
|
||||
/* check mixed outputs to be zero during init phase */
|
||||
if (r_page_servos[i] != r_page_servo_disarmed[i]) {
|
||||
|
@ -365,7 +365,7 @@ int test_mixer(int argc, char *argv[])
|
|||
|
||||
/* check ramp */
|
||||
|
||||
warnx("ramp:\t %d: out: %8.4f, servo: %d", i, (double)outputs[i], (int)r_page_servos[i]);
|
||||
fprintf(stderr, "ramp:\t %d: out: %8.4f, servo: %d \n", i, (double)outputs[i], (int)r_page_servos[i]);
|
||||
|
||||
if (hrt_elapsed_time(&starttime) < RAMP_TIME_US &&
|
||||
(r_page_servos[i] + 1 <= r_page_servo_disarmed[i] ||
|
||||
|
|
|
@ -9,6 +9,6 @@ set -e
|
|||
#./param_test
|
||||
./conversion_test
|
||||
./autodeclination_test
|
||||
./mixer_test > /dev/null
|
||||
./mixer_test 2> /dev/null
|
||||
./sbus2_test
|
||||
./rc_input_test
|
||||
|
|
Loading…
Reference in New Issue