X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftest%2Fao_flight_test.c;h=25ddb48fefb6f982a4558eac59c99089e463f1e3;hb=d37945f1404043e6bd287ce7ad7a57bc3289609b;hp=fbbc4bd97004997850c1c78939dd48b6d35abe7e;hpb=40c5535b65a75374fb1dbbd994c29324db814f5b;p=fw%2Faltos diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c index fbbc4bd9..25ddb48f 100644 --- a/src/test/ao_flight_test.c +++ b/src/test/ao_flight_test.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -57,6 +58,7 @@ int ao_gps_new; #define HAS_HMC5883 1 #define HAS_BEEP 1 #define AO_CONFIG_MAX_SIZE 1024 +#define AO_MMA655X_INVERT 0 struct ao_adc { int16_t sense[AO_ADC_NUM_SENSE]; @@ -70,6 +72,7 @@ struct ao_adc { #define AO_ADC_NUM_SENSE 2 #define HAS_MS5607 1 #define HAS_MMA655X 1 +#define AO_MMA655X_INVERT 1 #define HAS_BEEP 1 #define AO_CONFIG_MAX_SIZE 1024 @@ -372,6 +375,8 @@ uint16_t prev_tick; #define AO_PYRO_2 2 #define AO_PYRO_3 3 +#define PYRO_DBG 1 + static void ao_pyro_pin_set(uint8_t pin, uint8_t value) { @@ -554,9 +559,9 @@ ao_insert(void) ao_quaternion_rotate(&ao_out, &ao_x, &ao_rotation); +#if 0 int out = floor (atan2(ao_out.y, ao_out.x) * 180 / M_PI); -#if 0 printf ("%7.2f state %-8.8s height %8.4f tilt %4d rot %4d mag_tilt %4d mag_rot %4d\n", time, ao_state_names[ao_flight_state], @@ -717,7 +722,7 @@ ao_sleep(void *wchan) break; } #if TELEMEGA - if (log_format == AO_LOG_FORMAT_TELEMEGA && nword == 30 && strlen(words[0]) == 1) { + if ((log_format == AO_LOG_FORMAT_TELEMEGA_OLD || log_format == AO_LOG_FORMAT_TELEMEGA) && nword == 30 && strlen(words[0]) == 1) { int i; struct ao_ms5607_value value; @@ -895,7 +900,6 @@ ao_sleep(void *wchan) ao_config.accel_zero_along = atoi(words[3]); ao_config.accel_zero_across = atoi(words[5]); ao_config.accel_zero_through = atoi(words[7]); - printf ("%d %d %d\n", ao_config.accel_zero_along, ao_config.accel_zero_across, ao_config.accel_zero_through); #endif } else if (nword >= 4 && strcmp(words[0], "Main") == 0) { ao_config.main_deploy = atoi(words[2]);