From 075eb65603f2a13c3041618eacd53b34528fb628 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Sat, 31 Dec 2011 13:08:30 -0500 Subject: [PATCH] bootfault: fail initialization if no telemetry link is configured This detects a locked out state and fails the init. The new bootfault detection code will automatically drop to default hwsettings after 3 consecutive boot failures. That will put the board back into an unlocked state where the user can now enable a telemetry link using the GCS and everything will be OK. NOTE: Any configured telemetry link will be considered enough to boot up. If you only configure a serial telemetry link but don't know how to hook anything up to it, this will not save you. As the ultimate recovery, you can always load firmware on the board that wipes the settings entirely and start over. --- flight/CopterControl/System/pios_board.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flight/CopterControl/System/pios_board.c b/flight/CopterControl/System/pios_board.c index 9d8981eeb..a1f78f5dd 100644 --- a/flight/CopterControl/System/pios_board.c +++ b/flight/CopterControl/System/pios_board.c @@ -1488,6 +1488,9 @@ void PIOS_Board_Init(void) { PIOS_ADC_Init(); PIOS_GPIO_Init(); + + /* Make sure we have at least one telemetry link configured or else fail initialization */ + PIOS_Assert(pios_com_telem_rf_id || pios_com_telem_usb_id); } /**