mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-10 Uncrustify
This commit is contained in:
parent
f3b091ebc9
commit
aea3fccf7b
@ -301,6 +301,7 @@ inline QStringList getPluginPaths()
|
|||||||
QStringList rc;
|
QStringList rc;
|
||||||
|
|
||||||
QString pluginPath = QApplication::applicationDirPath();
|
QString pluginPath = QApplication::applicationDirPath();
|
||||||
|
|
||||||
pluginPath += QLatin1Char('/');
|
pluginPath += QLatin1Char('/');
|
||||||
pluginPath += QLatin1String(PLUGIN_REL_PATH);
|
pluginPath += QLatin1String(PLUGIN_REL_PATH);
|
||||||
rc.push_back(pluginPath);
|
rc.push_back(pluginPath);
|
||||||
|
@ -208,7 +208,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
QByteArray fw;
|
QByteArray fw;
|
||||||
dfu.DownloadFirmware(&fw, 0);
|
dfu.DownloadFirmware(&fw, 0);
|
||||||
bool ret = dfu.SaveByteArrayToFile(file.toLatin1(), fw);
|
bool ret = dfu.SaveByteArrayToFile(file.toLatin1(), fw);
|
||||||
return ret;
|
return ret;
|
||||||
} else if (action == OP_DFU::actionCompareCrc) {
|
} else if (action == OP_DFU::actionCompareCrc) {
|
||||||
dfu.CompareFirmware(file.toLatin1(), OP_DFU::crccompare, device);
|
dfu.CompareFirmware(file.toLatin1(), OP_DFU::crccompare, device);
|
||||||
|
@ -1111,8 +1111,8 @@ int DFUObject::receiveData(void *data, int size)
|
|||||||
qDebug() << "____timeout";
|
qDebug() << "____timeout";
|
||||||
}
|
}
|
||||||
if (x > size - 1) {
|
if (x > size - 1) {
|
||||||
qDebug() << "Error buffer overrun";
|
qDebug() << "Error buffer overrun";
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
@ -487,7 +487,7 @@ QString UrlFactory::MakeReverseGeocoderUrl(internals::PointLatLng &pt, const QSt
|
|||||||
#ifdef DEBUG_URLFACTORY
|
#ifdef DEBUG_URLFACTORY
|
||||||
qDebug() << "Language: " << language;
|
qDebug() << "Language: " << language;
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(language);
|
Q_UNUSED(language);
|
||||||
#endif
|
#endif
|
||||||
// CSV output has been depreciated. API key is no longer needed.
|
// CSV output has been depreciated. API key is no longer needed.
|
||||||
return QString("http://maps.googleapis.com/maps/api/geocode/xml?latlng=%1,%2").arg(QString::number(pt.Lat())).arg(QString::number(pt.Lng()));
|
return QString("http://maps.googleapis.com/maps/api/geocode/xml?latlng=%1,%2").arg(QString::number(pt.Lat())).arg(QString::number(pt.Lng()));
|
||||||
|
@ -41,6 +41,7 @@ namespace Utils {
|
|||||||
QString GetDataPath()
|
QString GetDataPath()
|
||||||
{
|
{
|
||||||
QString dataPath = QApplication::applicationDirPath();
|
QString dataPath = QApplication::applicationDirPath();
|
||||||
|
|
||||||
dataPath += QLatin1Char('/');
|
dataPath += QLatin1Char('/');
|
||||||
dataPath += QLatin1String(DATA_REL_PATH);
|
dataPath += QLatin1String(DATA_REL_PATH);
|
||||||
dataPath += QLatin1Char('/');
|
dataPath += QLatin1Char('/');
|
||||||
|
@ -129,7 +129,7 @@ const char *const GO_FORWARD = "GCS.GoForward";
|
|||||||
const char *const GOTOPREVIOUSGROUP = "GCS.GotoPreviousTabGroup";
|
const char *const GOTOPREVIOUSGROUP = "GCS.GotoPreviousTabGroup";
|
||||||
const char *const GOTONEXTGROUP = "GCS.GotoNextTabGroup";
|
const char *const GOTONEXTGROUP = "GCS.GotoNextTabGroup";
|
||||||
const char *const WINDOWSLIST = "GCS.WindowsList";
|
const char *const WINDOWSLIST = "GCS.WindowsList";
|
||||||
const char *const ABOUT_LIBREPILOTGCS = "GCS.AboutLibrePilotGCS";
|
const char *const ABOUT_LIBREPILOTGCS = "GCS.AboutLibrePilotGCS";
|
||||||
const char *const ABOUT_PLUGINS = "GCS.AboutPlugins";
|
const char *const ABOUT_PLUGINS = "GCS.AboutPlugins";
|
||||||
const char *const ABOUT_AUTHORS = "GCS.AboutAuthors";
|
const char *const ABOUT_AUTHORS = "GCS.AboutAuthors";
|
||||||
const char *const ABOUT_QT = "GCS.AboutQt";
|
const char *const ABOUT_QT = "GCS.AboutQt";
|
||||||
@ -212,7 +212,7 @@ const char *const ICON_PLUGIN = ":/core/images/pluginicon.png";
|
|||||||
const char *const ICON_EXIT = ":/core/images/exiticon.png";
|
const char *const ICON_EXIT = ":/core/images/exiticon.png";
|
||||||
const char *const ICON_OPTIONS = ":/core/images/optionsicon.png";
|
const char *const ICON_OPTIONS = ":/core/images/optionsicon.png";
|
||||||
const char *const ICON_HELP = ":/core/images/helpicon.png";
|
const char *const ICON_HELP = ":/core/images/helpicon.png";
|
||||||
const char *const ICON_LIBREPILOT = ":/core/images/librepiloticon.png";
|
const char *const ICON_LIBREPILOT = ":/core/images/librepiloticon.png";
|
||||||
|
|
||||||
|
|
||||||
// wizard kind
|
// wizard kind
|
||||||
|
@ -289,6 +289,7 @@ QString MainWindow::loadStyleSheet(QString fileName)
|
|||||||
QString style;
|
QString style;
|
||||||
// ...to open the file
|
// ...to open the file
|
||||||
QFile file(Utils::GetDataPath() + QString("stylesheets/") + fileName);
|
QFile file(Utils::GetDataPath() + QString("stylesheets/") + fileName);
|
||||||
|
|
||||||
qDebug() << "Loading style sheet file" << file.fileName();
|
qDebug() << "Loading style sheet file" << file.fileName();
|
||||||
if (file.open(QFile::ReadOnly)) {
|
if (file.open(QFile::ReadOnly)) {
|
||||||
// QTextStream...
|
// QTextStream...
|
||||||
|
@ -156,7 +156,7 @@ void opmap_edit_waypoint_dialog::setupModeWidgets()
|
|||||||
ui->dsb_modeParam3->setVisible(false);
|
ui->dsb_modeParam3->setVisible(false);
|
||||||
ui->dsb_modeParam4->setVisible(false);
|
ui->dsb_modeParam4->setVisible(false);
|
||||||
break;
|
break;
|
||||||
case MapDataDelegate::MODE_AUTOTAKEOFF:
|
case MapDataDelegate::MODE_AUTOTAKEOFF:
|
||||||
// FIXME: Do nothing?
|
// FIXME: Do nothing?
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -391,7 +391,7 @@ void ScopeGadgetWidget::addCurvePlot(QString objectName, QString fieldPlusSubFie
|
|||||||
meanSamples, mathFunction, m_plotDataSize,
|
meanSamples, mathFunction, m_plotDataSize,
|
||||||
pen, antialiased);
|
pen, antialiased);
|
||||||
} else {
|
} else {
|
||||||
Q_ASSERT(m_plotType == ChronoPlot);
|
Q_ASSERT(m_plotType == ChronoPlot);
|
||||||
plotData = new ChronoPlotData(object, field, element, scaleFactor,
|
plotData = new ChronoPlotData(object, field, element, scaleFactor,
|
||||||
meanSamples, mathFunction, m_plotDataSize,
|
meanSamples, mathFunction, m_plotDataSize,
|
||||||
pen, antialiased);
|
pen, antialiased);
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
const char *VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing";
|
const char *VehicleTemplateExportDialog::EXPORT_FIXEDWING_NAME = "fixedwing";
|
||||||
const char *VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor";
|
const char *VehicleTemplateExportDialog::EXPORT_MULTI_NAME = "multirotor";
|
||||||
const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";
|
const char *VehicleTemplateExportDialog::EXPORT_HELI_NAME = "helicopter";
|
||||||
const char *VehicleTemplateExportDialog::EXPORT_SURFACE_NAME = "surface";
|
const char *VehicleTemplateExportDialog::EXPORT_SURFACE_NAME = "surface";
|
||||||
const char *VehicleTemplateExportDialog::EXPORT_CUSTOM_NAME = "custom";
|
const char *VehicleTemplateExportDialog::EXPORT_CUSTOM_NAME = "custom";
|
||||||
|
|
||||||
|
@ -164,16 +164,16 @@ void UsageTrackerPlugin::collectUsageParameters(QMap<QString, QString> ¶mete
|
|||||||
parameters["board_type"] = "0x" + QString::number(boardModel, 16).toLower();
|
parameters["board_type"] = "0x" + QString::number(boardModel, 16).toLower();
|
||||||
parameters["board_serial"] = utilMngr->getBoardCPUSerial().toHex();
|
parameters["board_serial"] = utilMngr->getBoardCPUSerial().toHex();
|
||||||
parameters["bl_version"] = QString::number(utilMngr->getBootloaderRevision());
|
parameters["bl_version"] = QString::number(utilMngr->getBootloaderRevision());
|
||||||
parameters["fw_tag"] = devDesc.gitTag;
|
parameters["fw_tag"] = devDesc.gitTag;
|
||||||
parameters["fw_hash"] = devDesc.gitHash;
|
parameters["fw_hash"] = devDesc.gitHash;
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
|
||||||
parameters["os_version"] = QSysInfo::prettyProductName() + " " + QSysInfo::currentCpuArchitecture();
|
parameters["os_version"] = QSysInfo::prettyProductName() + " " + QSysInfo::currentCpuArchitecture();
|
||||||
#else
|
#else
|
||||||
parameters["os_version"] = "none";
|
parameters["os_version"] = "none";
|
||||||
#endif
|
#endif
|
||||||
parameters["os_threads"] = QString::number(QThread::idealThreadCount());
|
parameters["os_threads"] = QString::number(QThread::idealThreadCount());
|
||||||
parameters["os_timezone"] = QTimeZone::systemTimeZoneId();
|
parameters["os_timezone"] = QTimeZone::systemTimeZoneId();
|
||||||
parameters["gcs_version"] = VersionInfo::revision();
|
parameters["gcs_version"] = VersionInfo::revision();
|
||||||
|
|
||||||
// Configuration parameters
|
// Configuration parameters
|
||||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user