mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OP-1174 uploader gadget - fixed spelling mistake and simplfied erase button logic
This commit is contained in:
parent
ef9eaaba35
commit
b13b72acad
@ -100,7 +100,7 @@ UploaderGadgetWidget::UploaderGadgetWidget(QWidget *parent) : QWidget(parent)
|
||||
connect(m_config->eraseBootButton, SIGNAL(clicked()), this, SLOT(systemEraseBoot()));
|
||||
connect(m_config->rescueButton, SIGNAL(clicked()), this, SLOT(systemRescue()));
|
||||
Core::ConnectionManager *cm = Core::ICore::instance()->connectionManager();
|
||||
connect(cm, SIGNAL(deviceConnected(QIODevice *)), this, SLOT(onPhisicalHWConnect()));
|
||||
connect(cm, SIGNAL(deviceConnected(QIODevice *)), this, SLOT(onPhysicalHWConnect()));
|
||||
getSerialPorts();
|
||||
|
||||
m_config->autoUpdateButton->setEnabled(autoUpdateCapable());
|
||||
@ -189,14 +189,12 @@ void UploaderGadgetWidget::bootButtonsSetEnable(bool enabled)
|
||||
m_config->bootButton->setEnabled(enabled);
|
||||
m_config->safeBootButton->setEnabled(enabled);
|
||||
|
||||
|
||||
m_config->eraseBootButton->setEnabled(
|
||||
enabled &&
|
||||
// this feature is supported only on BL revision >= 4
|
||||
((dfu != NULL) && (dfu->devices[0].BL_Version >= 4)));
|
||||
bool isBL4 = ((dfu != NULL) && (dfu->devices[0].BL_Version >= 4));
|
||||
m_config->eraseBootButton->setEnabled(isBL4 && enabled);
|
||||
}
|
||||
|
||||
void UploaderGadgetWidget::onPhisicalHWConnect()
|
||||
void UploaderGadgetWidget::onPhysicalHWConnect()
|
||||
{
|
||||
bootButtonsSetEnable(false);
|
||||
m_config->rescueButton->setEnabled(false);
|
||||
|
@ -121,7 +121,7 @@ private:
|
||||
static const int AUTOUPDATE_CLOSE_TIMEOUT;
|
||||
QTimer autoUpdateCloseTimer;
|
||||
private slots:
|
||||
void onPhisicalHWConnect();
|
||||
void onPhysicalHWConnect();
|
||||
void versionMatchCheck();
|
||||
void error(QString errorString, int errorNumber);
|
||||
void info(QString infoString, int infoNumber);
|
||||
|
Loading…
x
Reference in New Issue
Block a user