altos: Delay reboot by a second to avoid re-entering idle mode
[fw/altos] / src / ao_cmd.c
index 6d3ae38da6c3b29bedc3706de558691c026251fc..8037195a13f12264af41866ce1671e8982cb1e84 100644 (file)
@@ -208,6 +208,13 @@ ao_reboot(void)
        ao_cmd_white();
        if (!ao_match_word("eboot"))
                return;
+
+       /* Delay waiting for the packet master to be turned off
+        * so that we don't end up back in idle mode because we
+        * received a packet after boot.
+        */
+       flush();
+       ao_delay(AO_SEC_TO_TICKS(1));
        WDCTL = WDCTL_EN | WDCTL_MODE_WATCHDOG | WDCTL_INT_64;
        ao_delay(AO_SEC_TO_TICKS(2));
        ao_panic(AO_PANIC_REBOOT);
@@ -219,6 +226,9 @@ version(void)
        printf("manufacturer     %s\n", ao_manufacturer);
        printf("product          %s\n", ao_product);
        printf("serial-number    %u\n", ao_serial_number);
+#if HAS_EEPROM
+       printf("log-format       %u\n", ao_log_format);
+#endif
        printf("software-version %s\n", ao_version);
 }