1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

OP-874 Enable the Erase Setting button only with BL ver >=4. Describe this this on the tooltip.

+review OPReview-421
This commit is contained in:
Alessio Morale 2013-04-08 01:31:29 +02:00
parent 09d2ba1d25
commit cc446260a7
2 changed files with 11 additions and 11 deletions

View File

@ -35,7 +35,7 @@ through serial or USB)</string>
<item>
<widget class="QPushButton" name="bootButton">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="toolTip">
<string>Boots the system.
@ -53,7 +53,7 @@ menu on the right.</string>
<item>
<widget class="QPushButton" name="safeBootButton">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="toolTip">
<string>Boots the system into safe mode (ie. default HwSettings).
@ -71,15 +71,10 @@ menu on the right.</string>
<item>
<widget class="QPushButton" name="eraseBootButton">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="toolTip">
<string>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.</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Reboot the board and clear its settings memory.&lt;/p&gt;&lt;p&gt; Useful if the board cannot boot properly.&lt;/p&gt;&lt;p&gt; Blue led starts blinking quick for 20-30 seconds than the board will start normally&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;If telemetry is not running, select the link using the dropdown&lt;/p&gt;&lt;p&gt;menu on the right.&lt;/p&gt;&lt;p&gt;PLEASE NOTE: Supported with bootloader versions 4.0 and earlier&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Erase settings</string>

View File

@ -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()
{