From 0658e99721e1bda1bfe6a4f30cd9ea8817545c0c Mon Sep 17 00:00:00 2001 From: eleccoder <9162301+eleccoder@users.noreply.github.com> Date: Wed, 28 Dec 2022 14:16:56 +0100 Subject: [PATCH] APRS symbol table/code no longer fixed --- include/aprs_pico.h | 4 ++++ src/aprs_pico.c | 5 ++++- src/aprs_pico_beacon_demo.c | 18 ++++++++++-------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/include/aprs_pico.h b/include/aprs_pico.h index 2f2c21d..1ef409f 100644 --- a/include/aprs_pico.h +++ b/include/aprs_pico.h @@ -42,6 +42,8 @@ audio_buffer_pool_t* aprs_pico_init(); * \param[in] latitude_in_deg The latitude of the geo-location (in degrees) * \param[in] longitude_in_deg The longitude of the geo-location (in degrees) * \param[in] altitude_in_m The altitude of the geo-location (in meters) + * \param[in] sym_table The APRS symbol table (e.g. '/' stands for 'Primary') + * \param[in] sym_code The APRS symbol code (e.g. '-' stands for 'House QTH') * \param[in] volume The volume level of the generated signal (0 ... 256) * * \retval 'true' - Successful operation @@ -57,6 +59,8 @@ bool aprs_pico_sendAPRS(audio_buffer_pool_t* audio_buffer_pool, double latitude_in_deg, double longitude_in_deg, double altitude_in_m, + char sym_table, + char sym_code, uint16_t volume); diff --git a/src/aprs_pico.c b/src/aprs_pico.c index c79ab02..2df0290 100644 --- a/src/aprs_pico.c +++ b/src/aprs_pico.c @@ -237,6 +237,8 @@ bool aprs_pico_sendAPRS(audio_buffer_pool_t* audio_buffer_pool, double latitude_in_deg, double longitude_in_deg, double altitude_in_m, + char sym_table, + char sym_code, uint16_t volume) { // NOTE: 'aprs_message' is allowed to be 'NULL' @@ -261,7 +263,8 @@ bool aprs_pico_sendAPRS(audio_buffer_pool_t* audio_buffer_pool, longitude_in_deg, altitude_in_m, aprs_message, - '/', 'O'); + sym_table, + sym_code); return ret_val == AX25_OK; } diff --git a/src/aprs_pico_beacon_demo.c b/src/aprs_pico_beacon_demo.c index 6a565be..14f16dd 100644 --- a/src/aprs_pico_beacon_demo.c +++ b/src/aprs_pico_beacon_demo.c @@ -35,15 +35,17 @@ int main() { // Send an APRS test message aprs_pico_sendAPRS(audio_buffer_pool, - "DL3TG", // Source call sign - "DL3TG", // Destination call sign - "PATH1", // APRS path #1 - "PATH2", // APRS path #2 + "DL3TG-9", // Source call sign + "APPIPI", // Destination call sign + "WIDE1-1", // APRS path #1 + "WIDE2-2", // APRS path #2 "APRS by RPi-Pico - https://github.com/eleccoder/raspi-pico-aprs-tnc", // Text message - 10.0, // Latitude (in deg) - 20.0, // Longitude (in deg) - alt_in_m, // Altitude (in m) - 128u); // Volume (0 ... 256) + 48.75588, // Latitude (in deg) + 9.19011, // Longitude (in deg) + alt_in_m, // Altitude (in m) + '/', // APRS symbol table: Primary + '>', // APRS symbol code: Car + 128u); // Volume (0 ... 256) // Don't raise too high ... alt_in_m = (alt_in_m < 1000.0) ? alt_in_m + 100.0 : 0.0;