altos: Strip out everything but the basic position reporting from APRS
[fw/altos] / src / test / ao_aprs_test.c
1 /*
2  * Copyright © 2012 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 2 of the License.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
16  */
17
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include <stdint.h>
22 #include <stdarg.h>
23
24 #include <ao_telemetry.h>
25
26 #define AO_APRS_TEST
27
28 #include <ao_aprs.c>
29
30 /*
31  * @section copyright_sec Copyright
32  *
33  * Copyright (c) 2001-2009 Michael Gray, KD7LMO
34
35
36  *
37  *
38  * @section gpl_sec GNU General Public License
39  *
40  *  This program is free software; you can redistribute it and/or modify
41  *  it under the terms of the GNU General Public License as published by
42  *  the Free Software Foundation; either version 2 of the License, or
43  *  (at your option) any later version.
44  *
45  *  This program is distributed in the hope that it will be useful,
46  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
47  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
48  *  GNU General Public License for more details.
49  *
50  *  You should have received a copy of the GNU General Public License
51  *  along with this program; if not, write to the Free Software
52  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
53  *  
54
55  */
56
57 static void
58 audio_gap(int secs)
59 {
60         int     samples = secs * 9600;
61
62         while (samples--)
63                 putchar(0x7f);
64 }
65
66 // This is where we go after reset.
67 int main(int argc, char **argv)
68 {
69     gpsInit();
70     tncInit();
71
72     audio_gap(1);
73
74     /* Transmit one packet */
75     tncTxPacket(TNC_MODE_1200_AFSK);
76
77     exit(0);
78 }
79
80
81
82