mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-01 18:29:16 +01:00
OP-1628 Fixed some review issues. Updated some text.
This commit is contained in:
parent
205a2d7b7a
commit
8ffc77f537
@ -86,7 +86,10 @@ void AutoUpdatePage::updateStatus(uploader::ProgressStep status, QVariant value)
|
|||||||
ui->statusLabel->setText(tr("Uploading description."));
|
ui->statusLabel->setText(tr("Uploading description."));
|
||||||
break;
|
break;
|
||||||
case uploader::BOOTING:
|
case uploader::BOOTING:
|
||||||
ui->statusLabel->setText(tr("Booting the board%1. Please wait").arg(value.toString()));
|
ui->statusLabel->setText(tr("Booting the board. Please wait"));
|
||||||
|
break;
|
||||||
|
case uploader::BOOTING_AND_ERASING:
|
||||||
|
ui->statusLabel->setText(tr("Booting and erasing the board. Please wait"));
|
||||||
break;
|
break;
|
||||||
case uploader::SUCCESS:
|
case uploader::SUCCESS:
|
||||||
m_isUpdating = false;
|
m_isUpdating = false;
|
||||||
@ -98,8 +101,9 @@ void AutoUpdatePage::updateStatus(uploader::ProgressStep status, QVariant value)
|
|||||||
enableButtons(true);
|
enableButtons(true);
|
||||||
QString msg = value.toString();
|
QString msg = value.toString();
|
||||||
if (msg.isEmpty()) {
|
if (msg.isEmpty()) {
|
||||||
msg = tr("Something went wrong, you will have to manually upgrade the board using the uploader plugin.");
|
msg = tr("Something went wrong.");
|
||||||
}
|
}
|
||||||
|
msg += tr(" You will have to manually upgrade the board using the uploader plugin.");
|
||||||
ui->statusLabel->setText(QString("<font color='red'>%1</font>").arg(msg));
|
ui->statusLabel->setText(QString("<font color='red'>%1</font>").arg(msg));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,10 @@
|
|||||||
#define ENUMS_H
|
#define ENUMS_H
|
||||||
|
|
||||||
namespace uploader {
|
namespace uploader {
|
||||||
typedef enum { IAP_STATE_READY, IAP_STATE_STEP_1, IAP_STATE_STEP_2, IAP_STEP_RESET, IAP_STATE_BOOTLOADER } IAPStep;
|
typedef enum { IAP_STATE_READY, IAP_STATE_STEP_1, IAP_STATE_STEP_2,
|
||||||
typedef enum { WAITING_DISCONNECT, WAITING_CONNECT, JUMP_TO_BL, LOADING_FW, UPLOADING_FW, UPLOADING_DESC, BOOTING, SUCCESS, FAILURE } ProgressStep;
|
IAP_STEP_RESET, IAP_STATE_BOOTLOADER } IAPStep;
|
||||||
|
typedef enum { WAITING_DISCONNECT, WAITING_CONNECT, JUMP_TO_BL, LOADING_FW,
|
||||||
|
UPLOADING_FW, UPLOADING_DESC, BOOTING, BOOTING_AND_ERASING,
|
||||||
|
SUCCESS, FAILURE } ProgressStep;
|
||||||
}
|
}
|
||||||
#endif // ENUMS_H
|
#endif // ENUMS_H
|
||||||
|
@ -66,10 +66,10 @@ void RebootDialog::progressUpdate(uploader::ProgressStep progress, QVariant mess
|
|||||||
if (progress == uploader::FAILURE) {
|
if (progress == uploader::FAILURE) {
|
||||||
ui->rebootProgressBar->setVisible(false);
|
ui->rebootProgressBar->setVisible(false);
|
||||||
ui->okButton->setVisible(true);
|
ui->okButton->setVisible(true);
|
||||||
ui->label->setText(tr("<font color='red'>Reboot failed!</font><p> Please perform a manual reboot by power cycling the board.<br>"
|
ui->label->setText(tr("<font color='red'>Reboot failed!</font><p>Please perform a manual reboot by power cycling the board.<br>"
|
||||||
"To power cycle the controller remove all batteries and the USB cable for at least 30 seconds.<br>"
|
"To power cycle the controller remove all batteries and the USB cable for at least 30 seconds.<br>"
|
||||||
"After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds.<br>"
|
"After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds.<br>"
|
||||||
"Then press Ok."));
|
"Then press Ok.</p>"));
|
||||||
QDialog::exec();
|
QDialog::exec();
|
||||||
} else {
|
} else {
|
||||||
accept();
|
accept();
|
||||||
|
@ -807,7 +807,7 @@ bool UploaderGadgetWidget::autoUpdate(bool erase)
|
|||||||
// Wait for board to connect to GCS again after boot and erase
|
// Wait for board to connect to GCS again after boot and erase
|
||||||
// For older board like CC3D this can take some time
|
// For older board like CC3D this can take some time
|
||||||
if (!telemetryManager->isConnected()) {
|
if (!telemetryManager->isConnected()) {
|
||||||
progressUpdate(BOOTING, erase ? tr(" and erasing settings") : QVariant());
|
progressUpdate(erase ? BOOTING_AND_ERASING : BOOTING, QVariant());
|
||||||
ResultEventLoop eventLoop;
|
ResultEventLoop eventLoop;
|
||||||
connect(telemetryManager, SIGNAL(connected()), &eventLoop, SLOT(success()));
|
connect(telemetryManager, SIGNAL(connected()), &eventLoop, SLOT(success()));
|
||||||
|
|
||||||
@ -1068,21 +1068,24 @@ void UploaderGadgetWidget::autoUpdateStatus(uploader::ProgressStep status, QVari
|
|||||||
m_config->autoUpdateLabel->setText(tr("Uploading description of the new firmware to the board."));
|
m_config->autoUpdateLabel->setText(tr("Uploading description of the new firmware to the board."));
|
||||||
break;
|
break;
|
||||||
case uploader::BOOTING:
|
case uploader::BOOTING:
|
||||||
m_config->autoUpdateLabel->setText(tr("Rebooting the board%1. Please wait.").arg(value.toString()));
|
m_config->autoUpdateLabel->setText(tr("Rebooting the board. Please wait."));
|
||||||
|
break;
|
||||||
|
case uploader::BOOTING_AND_ERASING:
|
||||||
|
m_config->autoUpdateLabel->setText(tr("Rebooting and erasing the board. Please wait."));
|
||||||
break;
|
break;
|
||||||
case uploader::SUCCESS:
|
case uploader::SUCCESS:
|
||||||
m_config->autoUpdateProgressBar->setValue(m_config->autoUpdateProgressBar->maximum());
|
m_config->autoUpdateProgressBar->setValue(m_config->autoUpdateProgressBar->maximum());
|
||||||
msg = tr("Board was updated successfully.");
|
msg = tr("Board was updated successfully. Press OK to finish.");
|
||||||
msg += " " + tr("Press OK to finish.");
|
|
||||||
m_config->autoUpdateLabel->setText(QString("<font color='green'>%1</font>").arg(msg));
|
m_config->autoUpdateLabel->setText(QString("<font color='green'>%1</font>").arg(msg));
|
||||||
finishAutoUpdate();
|
finishAutoUpdate();
|
||||||
break;
|
break;
|
||||||
case uploader::FAILURE:
|
case uploader::FAILURE:
|
||||||
msg = value.toString();
|
msg = value.toString();
|
||||||
if (msg.isEmpty()) {
|
if (msg.isEmpty()) {
|
||||||
msg = tr("Something went wrong, you will have to manually upgrade the board.");
|
msg = tr("Something went wrong.");
|
||||||
}
|
}
|
||||||
msg += " " + tr("Press OK to finish, you will have to manually upgrade the board.");
|
msg += tr(" Press OK to finish, you will have to manually upgrade the board.");
|
||||||
|
|
||||||
m_config->autoUpdateLabel->setText(QString("<font color='red'>%1</font>").arg(msg));
|
m_config->autoUpdateLabel->setText(QString("<font color='red'>%1</font>").arg(msg));
|
||||||
finishAutoUpdate();
|
finishAutoUpdate();
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user