mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
OP-1245 Uncrustify
This commit is contained in:
parent
d25eb01583
commit
4db48b7a5e
@ -43,6 +43,7 @@ FlightLogManager::FlightLogManager(QObject *parent) :
|
||||
m_adjustExportedTimestamps(true)
|
||||
{
|
||||
ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance();
|
||||
|
||||
Q_ASSERT(pluginManager);
|
||||
|
||||
m_objectManager = pluginManager->getObject<UAVObjectManager>();
|
||||
@ -287,6 +288,7 @@ void FlightLogManager::exportToOPL(QString fileName)
|
||||
void FlightLogManager::exportToCSV(QString fileName)
|
||||
{
|
||||
QFile csvFile(fileName);
|
||||
|
||||
if (csvFile.open(QFile::WriteOnly | QFile::Truncate)) {
|
||||
QTextStream csvStream(&csvFile);
|
||||
quint32 baseTime = 0;
|
||||
@ -308,8 +310,8 @@ void FlightLogManager::exportToCSV(QString fileName)
|
||||
void FlightLogManager::exportToXML(QString fileName)
|
||||
{
|
||||
QFile xmlFile(fileName);
|
||||
if (xmlFile.open(QFile::WriteOnly | QFile::Truncate)) {
|
||||
|
||||
if (xmlFile.open(QFile::WriteOnly | QFile::Truncate)) {
|
||||
QXmlStreamWriter xmlWriter(&xmlFile);
|
||||
xmlWriter.setAutoFormatting(true);
|
||||
xmlWriter.setAutoFormattingIndent(4);
|
||||
@ -381,14 +383,10 @@ void FlightLogManager::cancelExportLogs()
|
||||
}
|
||||
|
||||
void FlightLogManager::loadSettings()
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
void FlightLogManager::saveSettings()
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
void FlightLogManager::resetSettings()
|
||||
{
|
||||
@ -398,14 +396,10 @@ void FlightLogManager::resetSettings()
|
||||
}
|
||||
|
||||
void FlightLogManager::applySettingsToBoard()
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
void FlightLogManager::saveSettingsToBoard()
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
void FlightLogManager::updateFlightEntries(quint16 currentFlight)
|
||||
{
|
||||
@ -428,6 +422,7 @@ void FlightLogManager::setupUAVOWrappers()
|
||||
{
|
||||
foreach(QList<UAVObject *> objectList, m_objectManager->getObjects()) {
|
||||
UAVObject *object = objectList.at(0);
|
||||
|
||||
if (!object->isMetaDataObject() && !object->isSettingsObject()) {
|
||||
m_uavoEntries.append(new UAVOLogSettingsWrapper(object));
|
||||
qDebug() << objectList.at(0)->getName();
|
||||
@ -499,6 +494,7 @@ void ExtendedDebugLogEntry::toXML(QXmlStreamWriter *xmlWriter, quint32 baseTime)
|
||||
void ExtendedDebugLogEntry::toCSV(QTextStream *csvStream, quint32 baseTime)
|
||||
{
|
||||
QString data;
|
||||
|
||||
if (getType() == DebugLogEntry::TYPE_TEXT) {
|
||||
data = QString((const char *)getData().Data);
|
||||
} else if (getType() == DebugLogEntry::TYPE_UAVOBJECT) {
|
||||
|
@ -43,8 +43,7 @@
|
||||
#include "uavtalk/telemetrymanager.h"
|
||||
|
||||
class UAVOLogSettingsWrapper : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
|
||||
Q_OBJECT Q_PROPERTY(QString name READ name NOTIFY nameChanged)
|
||||
Q_PROPERTY(int setting READ setting WRITE setSetting NOTIFY settingChanged)
|
||||
Q_PROPERTY(int period READ period WRITE setPeriod NOTIFY periodChanged)
|
||||
|
||||
@ -99,8 +98,7 @@ private:
|
||||
};
|
||||
|
||||
class ExtendedDebugLogEntry : public DebugLogEntry {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString LogString READ getLogString WRITE setLogString NOTIFY LogStringUpdated)
|
||||
Q_OBJECT Q_PROPERTY(QString LogString READ getLogString WRITE setLogString NOTIFY LogStringUpdated)
|
||||
|
||||
public:
|
||||
explicit ExtendedDebugLogEntry();
|
||||
@ -130,8 +128,7 @@ private:
|
||||
};
|
||||
|
||||
class FlightLogManager : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(DebugLogStatus *flightLogStatus READ flightLogStatus)
|
||||
Q_OBJECT Q_PROPERTY(DebugLogStatus *flightLogStatus READ flightLogStatus)
|
||||
Q_PROPERTY(DebugLogControl * flightLogControl READ flightLogControl)
|
||||
Q_PROPERTY(DebugLogSettings * flightLogSettings READ flightLogSettings)
|
||||
Q_PROPERTY(QQmlListProperty<ExtendedDebugLogEntry> logEntries READ logEntries NOTIFY logEntriesChanged)
|
||||
@ -155,7 +152,8 @@ public:
|
||||
|
||||
QStringList flightEntries();
|
||||
|
||||
QStringList logSettings() {
|
||||
QStringList logSettings()
|
||||
{
|
||||
return m_logSettings;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user