mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
OP-1628 Initial reboot code.
This commit is contained in:
parent
57beb3d36c
commit
da62ef0dd6
@ -27,6 +27,10 @@
|
||||
|
||||
#include "rebootpage.h"
|
||||
#include "ui_rebootpage.h"
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <uavobjectutil/uavobjectutilmanager.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#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<UploaderGadgetFactory>();
|
||||
Q_ASSERT(uploader);
|
||||
connect(ui->rebootButton, SIGNAL(clicked()), uploader, SIGNAL(reboot()));
|
||||
}
|
||||
|
||||
RebootPage::~RebootPage()
|
||||
|
@ -37,7 +37,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string><!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></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
@ -54,9 +54,10 @@ p, li { white-space: pre-wrap; }
|
||||
<string><!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></string>
|
||||
</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></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
@ -66,10 +67,18 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item alignment="Qt::AlignHCenter">
|
||||
<widget class="QPushButton" name="rebootButton">
|
||||
<property name="text">
|
||||
<string>Reboot</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>yellowLabel</zorder>
|
||||
<zorder>redLabel</zorder>
|
||||
<zorder>label_3</zorder>
|
||||
<zorder>rebootButton</zorder>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user