diff options
author | Keith Packard <keithp@keithp.com> | 2013-05-03 00:52:30 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-05-03 00:52:30 -0700 |
commit | a18d68da1b0b23a6089166fcd14a5bb5368f10f1 (patch) | |
tree | ef0b0a584dc54d2542b7752432fc430d65f16b38 /src/core | |
parent | d6900a5d1fc24f007fc479eb528b199dd195e1eb (diff) |
altos: Make APRS deviation configurable
Maybe this will help the Yaesu VX-8GR receive our packets
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ao.h | 7 | ||||
-rw-r--r-- | src/core/ao_config.c | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/core/ao.h b/src/core/ao.h index 0ad3e4aa..731b43c8 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -749,7 +749,8 @@ struct ao_config { #if AO_PYRO_NUM struct ao_pyro pyro[AO_PYRO_NUM]; /* minor version 12 */ #endif - uint16_t aprs_interval; /* minor version 13 */ + uint8_t aprs_interval; /* minor version 13 */ + uint8_t aprs_width; /* minor version 13 */ #if HAS_RADIO_POWER uint8_t radio_power; /* minor version 14 */ #endif @@ -769,6 +770,10 @@ struct ao_config { #define AO_PAD_ORIENTATION_ANTENNA_UP 0 #define AO_PAD_ORIENTATION_ANTENNA_DOWN 1 +#define AO_APRS_WIDTH_NARROW 0 +#define AO_APRS_WIDTH_MEDIUM 1 +#define AO_APRS_WIDTH_WIDE 2 + extern __xdata struct ao_config ao_config; #define AO_CONFIG_MAX_SIZE 128 diff --git a/src/core/ao_config.c b/src/core/ao_config.c index 73608a55..eea1f832 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -141,8 +141,10 @@ _ao_config_get(void) if (minor < 12) memset(&ao_config.pyro, '\0', sizeof (ao_config.pyro)); #endif - if (minor < 13) + if (minor < 13) { ao_config.aprs_interval = 0; + ao_config.aprs_width = AO_APRS_WIDTH_MEDIUM; + } #if HAS_RADIO_POWER if (minor < 14) ao_config.radio_power = AO_CONFIG_DEFAULT_RADIO_POWER; @@ -518,7 +520,7 @@ ao_config_key_set(void) __reentrant void ao_config_aprs_show(void) { - printf ("APRS interval: %d\n", ao_config.aprs_interval); + printf ("APRS interval: %d width %d\n", ao_config.aprs_interval, ao_config.aprs_width); } void @@ -529,6 +531,14 @@ ao_config_aprs_set(void) return; _ao_config_edit_start(); ao_config.aprs_interval = ao_cmd_lex_i; + ao_cmd_decimal(); + if (ao_cmd_status == ao_cmd_success && + AO_APRS_WIDTH_NARROW <= ao_cmd_lex_i && + ao_cmd_lex_i <= AO_APRS_WIDTH_WIDE) + { + ao_config.aprs_width = ao_cmd_lex_i; + } else + ao_config.aprs_width = AO_APRS_WIDTH_MEDIUM; _ao_config_edit_finish(); } |