diff options
| author | Bdale Garbee <bdale@gag.com> | 2012-12-28 22:30:26 -0700 | 
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2012-12-28 22:30:26 -0700 | 
| commit | 59f355f5288b42b2e47743d06e41e55819a55f64 (patch) | |
| tree | 1ef54ec06088f86455173a9069b538655b965ffa /src/core/ao_config.c | |
| parent | 099d2b0ea59d825bd69a3fbb5523b9cbb9430ce8 (diff) | |
| parent | b70ca5eaf1c3d60bd9adf6835e1247f4147ca9c8 (diff) | |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/core/ao_config.c')
| -rw-r--r-- | src/core/ao_config.c | 29 | 
1 files changed, 28 insertions, 1 deletions
| diff --git a/src/core/ao_config.c b/src/core/ao_config.c index 797fe7ec..0aac16a6 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -128,7 +128,7 @@ _ao_config_get(void)  		if (minor < 6)  			ao_config.pad_orientation = AO_CONFIG_DEFAULT_PAD_ORIENTATION;  		if (minor < 8) -			ao_config.radio_enable = TRUE; +			ao_config.radio_enable = AO_RADIO_ENABLE_CORE;  		if (minor < 9)  			ao_xmemset(&ao_config.aes_key, '\0', AO_AES_LEN);  		if (minor < 10) @@ -139,6 +139,8 @@ _ao_config_get(void)  		if (minor < 12)  			memset(&ao_config.pyro, '\0', sizeof (ao_config.pyro));  #endif +		if (minor < 13) +			ao_config.aprs_interval = 0;  		ao_config.minor = AO_CONFIG_MINOR;  		ao_config_dirty = 1;  	} @@ -498,6 +500,27 @@ ao_config_key_set(void) __reentrant  }  #endif +#if HAS_APRS + +void +ao_config_aprs_show(void) +{ +	printf ("APRS interval: %d\n", ao_config.aprs_interval); +} + +void +ao_config_aprs_set(void) +{ +	ao_cmd_decimal(); +	if (ao_cmd_status != ao_cmd_success) +		return; +	_ao_config_edit_start(); +	ao_config.aprs_interval = ao_cmd_lex_i; +	_ao_config_edit_finish(); +} + +#endif /* HAS_APRS */ +  struct ao_config_var {  	__code char	*str;  	void		(*set)(void) __reentrant; @@ -554,6 +577,10 @@ __code struct ao_config_var ao_config_vars[] = {  	{ "P <n,?>\0Configure pyro channels",  	  ao_pyro_set, ao_pyro_show },  #endif +#if HAS_APRS +	{ "A <secs>\0APRS packet interval (0 disable)", +	  ao_config_aprs_set, ao_config_aprs_show }, +#endif  	{ "s\0Show",  	  ao_config_show,		0 },  #if HAS_EEPROM | 
