diff --git a/flight/modules/Logging/Logging.c b/flight/modules/Logging/Logging.c index c0592dd0a..fb0b57500 100644 --- a/flight/modules/Logging/Logging.c +++ b/flight/modules/Logging/Logging.c @@ -74,11 +74,11 @@ int32_t LoggingStart(void) SettingsUpdatedCb(DebugLogSettingsHandle()); UAVObjEvent ev = { - .obj = DebugLogSettingsHandle(), - .instId = 0, - .event = EV_UPDATED_PERIODIC, - .lowPriority = true, - }; + .obj = DebugLogSettingsHandle(), + .instId = 0, + .event = EV_UPDATED_PERIODIC, + .lowPriority = true, + }; EventPeriodicCallbackCreate(&ev, StatusUpdatedCb, 1000); // invoke a periodic dispatcher callback - the event struct is a dummy, it could be filled with anything! StatusUpdatedCb(&ev); diff --git a/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.cpp b/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.cpp index 9468cf2bb..02921236e 100644 --- a/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.cpp +++ b/ground/openpilotgcs/src/plugins/config/calibration/thermal/thermalcalibrationmodel.cpp @@ -72,7 +72,7 @@ ThermalCalibrationModel::ThermalCalibrationModel(QObject *parent) : } void ThermalCalibrationModel::init() { - if(!m_initDone){ + if (!m_initDone) { m_initDone = true; setStartEnabled(true); setEndEnabled(false); diff --git a/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp b/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp index c948ec730..d01f43c82 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configrevowidget.cpp @@ -236,7 +236,7 @@ ConfigRevoWidget::ConfigRevoWidget(QWidget *parent) : connect(m_thermalCalibrationModel, SIGNAL(temperatureChanged(QString)), m_ui->textTemperature, SLOT(setText(QString))); connect(m_thermalCalibrationModel, SIGNAL(temperatureGradientChanged(QString)), m_ui->textThermalGradient, SLOT(setText(QString))); connect(m_thermalCalibrationModel, SIGNAL(progressChanged(int)), m_ui->thermalBiasProgress, SLOT(setValue(int))); - //note: init for m_thermalCalibrationModel is done in showEvent to prevent cases wiht "Start" button not enabled due to some itming issue. + // note: init for m_thermalCalibrationModel is done in showEvent to prevent cases wiht "Start" button not enabled due to some itming issue. // Connect the signals connect(m_ui->accelBiasStart, SIGNAL(clicked()), this, SLOT(doStartAccelGyroBiasCalibration())); diff --git a/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp b/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp index d00952346..4c5d09842 100644 --- a/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/devicewidget.cpp @@ -136,7 +136,7 @@ void DeviceWidget::populate() status("Ready...", STATUSICON_INFO); QString fwFileName = getDevFirmwarePath(); QFile fwFile(fwFileName); - if(fwFile.exists()){ + if (fwFile.exists()) { loadFirmware(fwFileName); } } @@ -261,6 +261,7 @@ void DeviceWidget::status(QString str, StatusIcon ic) void DeviceWidget::loadFirmware() { QString file = setOpenFileName(); + loadFirmware(file); } @@ -525,6 +526,7 @@ QString DeviceWidget::getDevFirmwarePath() { QDir fwDirectory; QString fwDirectoryStr; + fwDirectoryStr = QCoreApplication::applicationDirPath(); fwDirectory = QDir(fwDirectoryStr); #ifdef Q_OS_WIN @@ -553,6 +555,7 @@ QString DeviceWidget::setOpenFileName() tr("Select firmware file"), fwDirectoryStr, tr("Firmware Files (*.opfw *.bin)")); + return fileName; }