From cc446260a7c85ead0b2687fb214b5a02a39bcc4e Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Mon, 8 Apr 2013 01:31:29 +0200 Subject: [PATCH] OP-874 Enable the Erase Setting button only with BL ver >=4. Describe this this on the tooltip. +review OPReview-421 --- .../openpilotgcs/src/plugins/uploader/uploader.ui | 13 ++++--------- .../src/plugins/uploader/uploadergadgetwidget.cpp | 9 +++++++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/uploader/uploader.ui b/ground/openpilotgcs/src/plugins/uploader/uploader.ui index 6fbf6950e..c07798b98 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploader.ui +++ b/ground/openpilotgcs/src/plugins/uploader/uploader.ui @@ -35,7 +35,7 @@ through serial or USB) - true + false Boots the system. @@ -53,7 +53,7 @@ menu on the right. - true + false Boots the system into safe mode (ie. default HwSettings). @@ -71,15 +71,10 @@ menu on the right. - true + false - Reboot the board and clear its settings memory. - Useful if the board cannot boot properly. - Blue led starts blinking quick for 20-30 seconds than the board will start normally - -If telemetry is not running, select the link using the dropdown -menu on the right. + <html><head/><body><p>Reboot the board and clear its settings memory.</p><p> Useful if the board cannot boot properly.</p><p> Blue led starts blinking quick for 20-30 seconds than the board will start normally</p><p><br/></p><p>If telemetry is not running, select the link using the dropdown</p><p>menu on the right.</p><p>PLEASE NOTE: Supported with bootloader versions 4.0 and earlier</p></body></html> Erase settings diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index 6150e9a29..2db6d0b34 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -140,8 +140,13 @@ void UploaderGadgetWidget::bootButtonsSetEnable(bool enabled) { m_config->bootButton->setEnabled(enabled); m_config->safeBootButton->setEnabled(enabled); - m_config->eraseBootButton->setEnabled(enabled); -} + + + m_config->eraseBootButton->setEnabled( + enabled && + // this feature is supported only on BL revision >= 4 + ((dfu != NULL) && (dfu->devices[0].BL_Version >= 4))); + } void UploaderGadgetWidget::onPhisicalHWConnect() {