diff options
| author | Keith Packard <keithp@keithp.com> | 2012-12-07 10:14:11 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-12-07 10:14:11 -0800 | 
| commit | 748e42ebf1dfb1efd5dec6ddd93f5c7aeedeb01d (patch) | |
| tree | 397e2e5b1086c8b34ca94a6c2a347d2df42ab173 /src | |
| parent | 75912f8af04cecc0bbffecb2072d465c3744d4e8 (diff) | |
| parent | c10f9a438ed5789479d21c78153ca7f14c05534c (diff) | |
Merge branch 'master' into aprs
Diffstat (limited to 'src')
| -rw-r--r-- | src/cc1111/ao_usb.c | 2 | ||||
| -rw-r--r-- | src/core/ao_cmd.c | 21 | ||||
| -rw-r--r-- | src/core/ao_config.c | 12 | ||||
| -rw-r--r-- | src/core/ao_stdio.c | 2 | ||||
| -rw-r--r-- | src/drivers/ao_btm.c | 2 | ||||
| -rw-r--r-- | src/drivers/ao_packet_master.c | 4 | 
6 files changed, 26 insertions, 17 deletions
| diff --git a/src/cc1111/ao_usb.c b/src/cc1111/ao_usb.c index 81e9074e..f66e807c 100644 --- a/src/cc1111/ao_usb.c +++ b/src/cc1111/ao_usb.c @@ -411,7 +411,7 @@ ao_usb_getchar(void) __critical  {  	int	c; -	while ((c = ao_usb_pollchar()) == -1) +	while ((c = ao_usb_pollchar()) == AO_READ_AGAIN)  		ao_sleep(&ao_stdin_ready);  	return c;  } diff --git a/src/core/ao_cmd.c b/src/core/ao_cmd.c index a3330974..3d086a57 100644 --- a/src/core/ao_cmd.c +++ b/src/core/ao_cmd.c @@ -265,12 +265,25 @@ ao_reboot(void)  static void  version(void)  { -	printf("manufacturer     %s\n", ao_manufacturer); -	printf("product          %s\n", ao_product); -	printf("serial-number    %u\n", ao_serial_number); +	printf("manufacturer     %s\n" +	       "product          %s\n" +	       "serial-number    %u\n" +#if HAS_FLIGHT +	       "current-flight   %u\n" +#endif +#if HAS_LOG +	       "log-format       %u\n" +#endif +	       , ao_manufacturer +	       , ao_product +	       , ao_serial_number +#if HAS_FLIGHT +	       , ao_flight_number +#endif  #if HAS_LOG -	printf("log-format       %u\n", ao_log_format); +	       , ao_log_format  #endif +		);  #if HAS_MS5607  	ao_ms5607_info();  #endif diff --git a/src/core/ao_config.c b/src/core/ao_config.c index df40ff90..63158158 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -529,15 +529,15 @@ __code struct ao_config_var ao_config_vars[] = {  	  ao_config_callsign_set,	ao_config_callsign_show },  	{ "e <0 disable, 1 enable>\0Enable telemetry and RDF",  	  ao_config_radio_enable_set, ao_config_radio_enable_show }, +	{ "f <cal>\0Radio calib (cal = rf/(xtal/2^16))", +	  ao_config_radio_cal_set,  	ao_config_radio_cal_show },  #endif /* HAS_RADIO */  #if HAS_ACCEL  	{ "a <+g> <-g>\0Accel calib (0 for auto)",  	  ao_config_accel_calibrate_set,ao_config_accel_calibrate_show }, +	{ "o <0 antenna up, 1 antenna down>\0Set pad orientation", +	  ao_config_pad_orientation_set,ao_config_pad_orientation_show },  #endif /* HAS_ACCEL */ -#if HAS_RADIO -	{ "f <cal>\0Radio calib (cal = rf/(xtal/2^16))", -	  ao_config_radio_cal_set,  	ao_config_radio_cal_show }, -#endif /* HAS_RADIO */  #if HAS_LOG  	{ "l <size>\0Flight log size (kB)",  	  ao_config_log_set,		ao_config_log_show }, @@ -546,10 +546,6 @@ __code struct ao_config_var ao_config_vars[] = {  	{ "i <0 dual, 1 apogee, 2 main>\0Set igniter mode",  	  ao_config_ignite_mode_set,	ao_config_ignite_mode_show },  #endif -#if HAS_ACCEL -	{ "o <0 antenna up, 1 antenna down>\0Set pad orientation", -	  ao_config_pad_orientation_set,ao_config_pad_orientation_show }, -#endif  #if HAS_AES  	{ "k <32 hex digits>\0Set AES encryption key",  	  ao_config_key_set, ao_config_key_show }, diff --git a/src/core/ao_stdio.c b/src/core/ao_stdio.c index 4a832487..1748dfe8 100644 --- a/src/core/ao_stdio.c +++ b/src/core/ao_stdio.c @@ -98,7 +98,7 @@ __xdata uint8_t ao_stdin_ready;  char  getchar(void) __reentrant  { -	char c; +	int c;  	ao_arch_critical(  		int8_t stdio = ao_cur_stdio; diff --git a/src/drivers/ao_btm.c b/src/drivers/ao_btm.c index f3816047..c862200a 100644 --- a/src/drivers/ao_btm.c +++ b/src/drivers/ao_btm.c @@ -120,7 +120,7 @@ uint8_t  ao_btm_get_line(void)  {  	uint8_t ao_btm_reply_len = 0; -	char c; +	int c;  	for (;;) { diff --git a/src/drivers/ao_packet_master.c b/src/drivers/ao_packet_master.c index 481232df..023c788b 100644 --- a/src/drivers/ao_packet_master.c +++ b/src/drivers/ao_packet_master.c @@ -20,7 +20,7 @@  static char  ao_packet_getchar(void)  { -	char c; +	int c;  	while ((c = ao_packet_pollchar()) == AO_READ_AGAIN) {  		if (!ao_packet_enable)  			break; @@ -35,7 +35,7 @@ ao_packet_getchar(void)  static void  ao_packet_echo(void) __reentrant  { -	char	c; +	int	c;  	while (ao_packet_enable) {  		c = ao_packet_getchar();  		if (c != AO_READ_AGAIN) | 
