1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

OP-1628 Uncrustify

This commit is contained in:
m_thread 2014-12-09 00:50:26 +01:00
parent cb1d9586eb
commit ff1ad84302
4 changed files with 13 additions and 8 deletions

View File

@ -240,7 +240,7 @@ void ConfigCustomWidget::refreshWidgetsValues(QString frameType)
if (MixerSettings * mxr = qobject_cast<MixerSettings *>(mixer)) {
MixerSettings::DataFields mixerSettingsData = mxr->getData();
if (mixerSettingsData.Curve2Source == MixerSettings::CURVE2SOURCE_THROTTLE && Throttle2CurveMin >= 0 ) {
if (mixerSettingsData.Curve2Source == MixerSettings::CURVE2SOURCE_THROTTLE && Throttle2CurveMin >= 0) {
m_aircraft->customThrottle2Curve->setMixerType(MixerCurve::MIXERCURVE_THROTTLE);
} else {
m_aircraft->customThrottle2Curve->setMixerType(MixerCurve::MIXERCURVE_PITCH);

View File

@ -320,9 +320,9 @@ void ConfigGroundVehicleWidget::initMixerCurves(QString frameType)
} else {
// no, init a straight curve
if (frameType == "GroundVehicleDifferential") {
m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 0.8, -0.8);
m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 0.8, -0.8);
} else {
m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 1.0);
m_aircraft->groundVehicleThrottle2->initLinearCurve(curveValues.count(), 1.0);
}
}
}

View File

@ -38,6 +38,7 @@ void AutoUpdatePage::enableButtons(bool enable = false)
void AutoUpdatePage::autoUpdate()
{
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
Q_ASSERT(pm);
UploaderGadgetFactory *uploader = pm->getObject<UploaderGadgetFactory>();
Q_ASSERT(uploader);

View File

@ -46,7 +46,7 @@
const int UploaderGadgetWidget::BOARD_EVENT_TIMEOUT = 20000;
const int UploaderGadgetWidget::AUTOUPDATE_CLOSE_TIMEOUT = 7000;
const int UploaderGadgetWidget::AUTOUPDATE_TIMEOUT = 60000;
const int UploaderGadgetWidget::AUTOUPDATE_TIMEOUT = 60000;
TimedDialog::TimedDialog(const QString &title, const QString &labelText, int timeout, QWidget *parent, Qt::WindowFlags flags) :
QProgressDialog(labelText, tr("Cancel"), 0, timeout, parent, flags), bar(new QProgressBar(this))
@ -619,6 +619,7 @@ bool UploaderGadgetWidget::autoUpdateCapable()
bool UploaderGadgetWidget::autoUpdate(bool erase)
{
ResultEventLoop eventLoop;
connect(this, SIGNAL(bootloaderSuccess()), &eventLoop, SLOT(success()));
connect(this, SIGNAL(bootloaderFailed()), &eventLoop, SLOT(fail()));
@ -641,7 +642,7 @@ bool UploaderGadgetWidget::autoUpdate(bool erase)
emit progressUpdate(JUMP_TO_BL, QVariant());
if (!dfu->enterDFU(0) || !dfu->findDevices() ||
(dfu->numberOfDevices != 1) || dfu->numberOfDevices > 5) {
(dfu->numberOfDevices != 1) || dfu->numberOfDevices > 5) {
delete dfu;
dfu = NULL;
cm->resumePolling();
@ -1053,17 +1054,20 @@ int UploaderGadgetWidget::cannotResetMessageBox()
}
int ResultEventLoop::run(int millisTimout) {
int ResultEventLoop::run(int millisTimout)
{
m_timer.singleShot(millisTimout, this, SLOT(fail()));
return exec();
}
void ResultEventLoop::success() {
void ResultEventLoop::success()
{
m_timer.stop();
exit(0);
}
void ResultEventLoop::fail() {
void ResultEventLoop::fail()
{
m_timer.stop();
exit(-1);
}