1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

OP-874 UI does not relies on enabled state but set button state at widget initialization, fixes for styles

+review OPReview-421
This commit is contained in:
Alessio Morale 2013-04-08 23:55:11 +02:00
parent cc446260a7
commit 3f88a64cf3
3 changed files with 8 additions and 10 deletions

View File

@ -524,19 +524,15 @@ int DFUObject::JumpToApp(bool safeboot, bool erase)
buf[5] = 0;
buf[6] = 0;
buf[7] = 0;
if (safeboot)
{
if (safeboot) {
/* force system to safe boot mode (hwsettings == defaults) */
buf[8] = 0x5A;
buf[9] = 0xFE;
}
else
{
} else {
buf[8] = 0;
buf[9] = 0;
}
if(erase)
{
if (erase) {
// force data flash clear
buf[10] = 0x00;
buf[11] = 0x00;

View File

@ -35,7 +35,7 @@ through serial or USB)</string>
<item>
<widget class="QPushButton" name="bootButton">
<property name="enabled">
<bool>false</bool>
<bool>true</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>false</bool>
<bool>true</bool>
</property>
<property name="toolTip">
<string>Boots the system into safe mode (ie. default HwSettings).
@ -71,7 +71,7 @@ menu on the right.</string>
<item>
<widget class="QPushButton" name="eraseBootButton">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="toolTip">
<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>

View File

@ -64,6 +64,8 @@ UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent)
rbi.addFile(QString(":uploader/images/view-refresh.svg"));
m_config->refreshPorts->setIcon(rbi);
bootButtonsSetEnable(false);
connect(m_config->refreshPorts, SIGNAL(clicked()), this, SLOT(getSerialPorts()));
connect(m_config->pbHelp,SIGNAL(clicked()),this,SLOT(openHelp()));