summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ao_aprs_test.c24
-rw-r--r--src/test/ao_flight_test.c2
2 files changed, 2 insertions, 24 deletions
diff --git a/src/test/ao_aprs_test.c b/src/test/ao_aprs_test.c
index 86cf527a..573b5cb2 100644
--- a/src/test/ao_aprs_test.c
+++ b/src/test/ao_aprs_test.c
@@ -97,36 +97,12 @@ audio_gap(int secs)
#endif
}
-#include <math.h>
-
-int
-ao_aprs_encode_altitude_expensive(int meters)
-{
- double feet = meters / 0.3048;
-
- double encode = log(feet) / log(1.002);
- return floor(encode + 0.5);
-}
-
// This is where we go after reset.
int main(int argc, char **argv)
{
int e, x;
int a;
- for (a = 1; a < 100000; a++) {
- e = ao_aprs_encode_altitude(a);
- x = ao_aprs_encode_altitude_expensive(a);
-
- if (e != x) {
- double back_feet, back_meters;
- back_feet = pow(1.002, e);
- back_meters = back_feet * 0.3048;
- fprintf (stderr, "APRS altitude encoding failure: altitude %d actual %d expected %d actual meters %f\n",
- a, e, x, back_meters);
- }
- }
-
audio_gap(1);
ao_gps_data.latitude = (45.0 + 28.25 / 60.0) * 10000000;
diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c
index 0647fc6c..1ab22e5b 100644
--- a/src/test/ao_flight_test.c
+++ b/src/test/ao_flight_test.c
@@ -50,6 +50,7 @@ int ao_gps_new;
#define HAS_MMA655X 1
#define HAS_HMC5883 1
#define HAS_BEEP 1
+#define AO_CONFIG_MAX_SIZE 1024
struct ao_adc {
int16_t sense[AO_ADC_NUM_SENSE];
@@ -795,6 +796,7 @@ ao_sleep(void *wchan)
pyro->flags |= ao_pyro_values[j].flag;
if (ao_pyro_values[j].offset != NO_VALUE && i + 1 < nword) {
int16_t val = strtoul(words[++i], NULL, 10);
+ printf("pyro %d condition %s value %d\n", p, words[i-1], val);
*((int16_t *) ((char *) pyro + ao_pyro_values[j].offset)) = val;
}
}