altos-avr: Include serial/flight in companion commands
[fw/altos] / src-avr / ao_cmd.c
index 86ec1fe00cadccfe1ac94bcffbfb37f1cadffa47..16a05472af4596788b356377954455fbfa6c2dc6 100644 (file)
@@ -32,7 +32,7 @@ static void
 put_string(char *s)
 {
        __xdata char    c;
-       while (c = *s++)
+       while ((c = *s++))
                putchar(c);
 }
 
@@ -186,12 +186,14 @@ ao_match_word(__code char *word)
        return 1;
 }
 
+#if 0
 static void
 eol(void)
 {
        while (ao_cmd_lex_c != '\n')
                ao_cmd_lex();
 }
+#endif
 
 static void
 echo(void)
@@ -215,12 +217,16 @@ ao_reboot(void)
        ao_panic(AO_PANIC_REBOOT);
 }
 
+
 static void
 version(void)
 {
        printf("manufacturer     %s\n", ao_manufacturer);
        printf("product          %s\n", ao_product);
-       printf("serial-number    %u\n", ao_romconfig.serial_number);
+       printf("serial-number    %u\n", ao_serial_number);
+#if HAS_LOG
+       printf("log-format       %u\n", ao_log_format);
+#endif
        printf("software-version %s\n", ao_version);
 }
 
@@ -255,6 +261,7 @@ report(void)
        case ao_cmd_syntax_error:
                puts("Syntax error");
                ao_cmd_status = 0;
+       default:
                break;
        }
 }