summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-12-06 16:29:36 -0800
committerKeith Packard <keithp@keithp.com>2012-12-06 16:29:36 -0800
commit9d095eb1987f35d0d4e6540bf335e1faaa7c86ec (patch)
treed60ee91b9755c6cbca8d0558b917f9ef3a21a719
parentce12787b56f699166cafe4cdee9e2a4d8e66ebed (diff)
altos: Shrink 'ao_version' by calling printf fewer times
Each printf call costs quite a bit of code space on the cc1111, so instead of making multiple short calls, make one longer one. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/core/ao_cmd.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/core/ao_cmd.c b/src/core/ao_cmd.c
index a3330974..9e78a225 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
+ "flight-number %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