From 5a2c53804f2610f3e27378257956cf9d274ac5aa Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Sun, 5 May 2013 15:15:44 +0200 Subject: [PATCH] OP-917 Make reboot over telemetry link works. UserDFU timeouts to the user application when no USB connection is found. +review OPReview-456 --- flight/targets/boards/coptercontrol/bootloader/main.c | 3 +-- flight/targets/boards/revolution/bootloader/main.c | 3 +-- flight/targets/boards/revoproto/bootloader/main.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/flight/targets/boards/coptercontrol/bootloader/main.c b/flight/targets/boards/coptercontrol/bootloader/main.c index 0b392193a..d603ea145 100644 --- a/flight/targets/boards/coptercontrol/bootloader/main.c +++ b/flight/targets/boards/coptercontrol/bootloader/main.c @@ -156,8 +156,7 @@ int main() { if (stopwatch > 50 * 1000 * 1000) stopwatch = 0; - if ((stopwatch > 6 * 1000 * 1000) && (DeviceState - == BLidle)) + if ((stopwatch > 6 * 1000 * 1000) && ((DeviceState == BLidle) || (DeviceState == DFUidle && !USB_connected))) JumpToApp = TRUE; processRX(); diff --git a/flight/targets/boards/revolution/bootloader/main.c b/flight/targets/boards/revolution/bootloader/main.c index db02ff0ad..b1e408c6a 100644 --- a/flight/targets/boards/revolution/bootloader/main.c +++ b/flight/targets/boards/revolution/bootloader/main.c @@ -161,8 +161,7 @@ int main() { if (stopwatch > 50 * 1000 * 1000) stopwatch = 0; - if ((stopwatch > 6 * 1000 * 1000) && (DeviceState - == BLidle)) + if ((stopwatch > 6 * 1000 * 1000) && ((DeviceState == BLidle) || (DeviceState == DFUidle && !USB_connected))) JumpToApp = true; processRX(); diff --git a/flight/targets/boards/revoproto/bootloader/main.c b/flight/targets/boards/revoproto/bootloader/main.c index 1f364abba..6d1ab5bf9 100644 --- a/flight/targets/boards/revoproto/bootloader/main.c +++ b/flight/targets/boards/revoproto/bootloader/main.c @@ -161,8 +161,7 @@ int main() { if (stopwatch > 50 * 1000 * 1000) stopwatch = 0; - if ((stopwatch > 6 * 1000 * 1000) && (DeviceState - == BLidle)) + if ((stopwatch > 6 * 1000 * 1000) && ((DeviceState == BLidle) || (DeviceState == DFUidle && !USB_connected))) JumpToApp = true; processRX();