diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/rebootpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/rebootpage.cpp index 4ca0c9c74..e534eda0b 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/rebootpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/rebootpage.cpp @@ -27,6 +27,10 @@ #include "rebootpage.h" #include "ui_rebootpage.h" +#include +#include +#include +#include "uploader/uploadergadgetfactory.h" RebootPage::RebootPage(SetupWizard *wizard, QWidget *parent) : AbstractWizardPage(wizard, parent), @@ -35,6 +39,11 @@ RebootPage::RebootPage(SetupWizard *wizard, QWidget *parent) : ui->setupUi(this); ui->yellowLabel->setVisible(false); ui->redLabel->setVisible(true); + ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); + Q_ASSERT(pm); + UploaderGadgetFactory *uploader = pm->getObject(); + Q_ASSERT(uploader); + connect(ui->rebootButton, SIGNAL(clicked()), uploader, SIGNAL(reboot())); } RebootPage::~RebootPage() diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/rebootpage.ui b/ground/openpilotgcs/src/plugins/setupwizard/pages/rebootpage.ui index 4bcc0321c..2c63f6928 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/rebootpage.ui +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/rebootpage.ui @@ -37,7 +37,7 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> <p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:18pt; color:#ffd500;">PLEASE REBOOT YOUR CONTROLLER</span></p></body></html> @@ -54,9 +54,10 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Cantarell'; font-size:11pt; font-weight:400; font-style:normal;"> -<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; color:#000000;">The configuration created by the wizard contains settings that require a reboot of your controller. Please power cycle the controller before continuing. To power cycle the controller remove all batteries and the USB cable for at least 30 seconds.</span></p> -<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; color:#000000;">After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds. Then press next.</span></p></body></html> +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; color:#000000;">The configuration created by the wizard contains settings that require a reboot of your controller. </span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; color:#000000;">There are two ways to reboot your board:</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600; color:#000000;">1. Software Reboot</span><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; color:#000000;"><br />Press the button below to reboot board. Wait for the board to connect again before pressing Next. After board is connected press Next to continue wizard.<br /><br /></span><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600; color:#000000;">2. Power Cycle </span><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; color:#000000;"><br />To power cycle the controller remove all batteries and the USB cable for at least 30 seconds. After 30 seconds, plug in the board again and wait for it to connect, this can take a few seconds. Then press next.</span></p></body></html> Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -66,10 +67,18 @@ p, li { white-space: pre-wrap; } + + + + Reboot + + + yellowLabel redLabel label_3 + rebootButton