summaryrefslogtreecommitdiff
path: root/src/drivers/ao_aprs.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-20 00:41:17 -0700
committerKeith Packard <keithp@keithp.com>2014-06-20 00:41:17 -0700
commit602d6a2424a5c16e22febf6b4e6b3816022261c7 (patch)
treeea302a4a96c0ec182e0f7fba1452203ef0c20dc3 /src/drivers/ao_aprs.c
parent3016ee5f21ec66bf9230b90ab1420b8fad628f8d (diff)
altos/aprs: Encode last serial number in SSID. Transmit serial in comment
This makes it a lot easier to tell which device is sending information, and to receive data from multiple devices on the same receiver. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_aprs.c')
-rw-r--r--src/drivers/ao_aprs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/ao_aprs.c b/src/drivers/ao_aprs.c
index 8a1b6a4d..c33016f0 100644
--- a/src/drivers/ao_aprs.c
+++ b/src/drivers/ao_aprs.c
@@ -261,6 +261,7 @@ static uint8_t TNC_AX25_HEADER[] = {
#define TNC_CALLSIGN_OFF 7
#define TNC_CALLSIGN_LEN 6
+#define TNC_SSID_OFF 13
static void
tncSetCallsign(void)
@@ -275,6 +276,7 @@ tncSetCallsign(void)
}
for (; i < TNC_CALLSIGN_LEN; i++)
TNC_AX25_HEADER[TNC_CALLSIGN_OFF + i] = ' ' << 1;
+ TNC_AX25_HEADER[TNC_SSID_OFF] = 0x60 | ((ao_serial_number % 10) << 1);
#endif
}
@@ -530,6 +532,7 @@ static int tncComment(uint8_t *buf)
#ifdef AO_SENSE_MAIN
" M%d.%d"
#endif
+ " %d"
, ao_gps_locked(),
ao_num_sats(),
battery/10,
@@ -542,6 +545,7 @@ static int tncComment(uint8_t *buf)
, main/10,
main%10
#endif
+ , ao_serial_number
);
#else
return sprintf((char *) buf,