X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftest%2Fao_aprs_test.c;h=69147786ff26e413533a441be00bfa9d94f105d2;hb=7f4650990e8a7cfcf8461e8928dfc426c9a563cc;hp=d0cfb52d955ca2119fc9c6233985f6937daaaf19;hpb=51ef826372f466f44901c4c609ed6a987d30fda4;p=fw%2Faltos diff --git a/src/test/ao_aprs_test.c b/src/test/ao_aprs_test.c index d0cfb52d..69147786 100644 --- a/src/test/ao_aprs_test.c +++ b/src/test/ao_aprs_test.c @@ -23,6 +23,8 @@ #include +struct ao_telemetry_location ao_gps_data; + #define AO_APRS_TEST typedef int16_t (*ao_radio_fill_func)(uint8_t *buffer, int16_t len); @@ -44,7 +46,7 @@ ao_aprs_bit(uint8_t bit) #endif void -ao_radio_send_lots(ao_radio_fill_func fill); +ao_radio_send_aprs(ao_radio_fill_func fill); #include @@ -91,14 +93,21 @@ int main(int argc, char **argv) { audio_gap(1); + ao_gps_data.latitude = (45.0 + 28.25 / 60.0) * 10000000; + ao_gps_data.longitude = (-(122 + 44.2649 / 60.0)) * 10000000; + ao_gps_data.altitude = 84; + /* Transmit one packet */ ao_aprs_send(); + tncBuffer[strlen((char *) tncBuffer) - 2] = '\0'; + fprintf(stderr, "packet: %s\n", tncBuffer); + exit(0); } void -ao_radio_send_lots(ao_radio_fill_func fill) +ao_radio_send_aprs(ao_radio_fill_func fill) { int16_t len; uint8_t done = 0;