Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
f1aee303
Commit
f1aee303
authored
Oct 26, 2016
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just being really OCD.
parent
c3f0a51f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
127 additions
and
127 deletions
+127
-127
qgroundcontrol.pro
qgroundcontrol.pro
+2
-2
QGCToolbox.cc
src/QGCToolbox.cc
+2
-2
QGCToolbox.h
src/QGCToolbox.h
+3
-3
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+3
-3
MAVLinkLogManager.cc
src/Vehicle/MAVLinkLogManager.cc
+96
-96
MAVLinkLogManager.h
src/Vehicle/MAVLinkLogManager.h
+20
-20
MavlinkSettings.qml
src/ui/preferences/MavlinkSettings.qml
+1
-1
No files found.
qgroundcontrol.pro
View file @
f1aee303
...
...
@@ -334,7 +334,7 @@ HEADERS += \
src/uas/UAS.h \
src/uas/UASInterface.h \
src/uas/UASMessageHandler.h \
src/Vehicle/M
avl
inkLogManager.h \
src/Vehicle/M
AVL
inkLogManager.h \
src/ui/toolbar/MainToolBarController.h \
src/AutoPilotPlugins/PX4/PX4AirframeLoader.h \
src/AutoPilotPlugins/APM/APMAirframeLoader.h \
...
...
@@ -499,7 +499,7 @@ SOURCES += \
src/QmlControls/QmlObjectListModel.cc \
src/uas/UAS.cc \
src/uas/UASMessageHandler.cc \
src/Vehicle/M
avl
inkLogManager.cc \
src/Vehicle/M
AVL
inkLogManager.cc \
src/ui/toolbar/MainToolBarController.cc \
src/AutoPilotPlugins/PX4/PX4AirframeLoader.cc \
src/AutoPilotPlugins/APM/APMAirframeLoader.cc \
...
...
src/QGCToolbox.cc
View file @
f1aee303
...
...
@@ -28,7 +28,7 @@
#include "FollowMe.h"
#include "PositionManager.h"
#include "VideoManager.h"
#include "M
avl
inkLogManager.h"
#include "M
AVL
inkLogManager.h"
QGCToolbox
::
QGCToolbox
(
QGCApplication
*
app
)
:
_audioOutput
(
NULL
)
...
...
@@ -73,7 +73,7 @@ QGCToolbox::QGCToolbox(QGCApplication* app)
_qgcPositionManager
=
new
QGCPositionManager
(
app
);
_followMe
=
new
FollowMe
(
app
);
_videoManager
=
new
VideoManager
(
app
);
_mavlinkLogManager
=
new
M
avl
inkLogManager
(
app
);
_mavlinkLogManager
=
new
M
AVL
inkLogManager
(
app
);
}
void
QGCToolbox
::
setChildToolboxes
(
void
)
...
...
src/QGCToolbox.h
View file @
f1aee303
...
...
@@ -32,7 +32,7 @@ class QGCImageProvider;
class
UASMessageHandler
;
class
QGCPositionManager
;
class
VideoManager
;
class
M
avl
inkLogManager
;
class
M
AVL
inkLogManager
;
/// This is used to manage all of our top level services/tools
class
QGCToolbox
{
...
...
@@ -57,7 +57,7 @@ public:
FollowMe
*
followMe
(
void
)
{
return
_followMe
;
}
QGCPositionManager
*
qgcPositionManager
(
void
)
{
return
_qgcPositionManager
;
}
VideoManager
*
videoManager
(
void
)
{
return
_videoManager
;
}
M
avl
inkLogManager
*
mavlinkLogManager
(
void
)
{
return
_mavlinkLogManager
;
}
M
AVL
inkLogManager
*
mavlinkLogManager
(
void
)
{
return
_mavlinkLogManager
;
}
#ifndef __mobile__
GPSManager
*
gpsManager
(
void
)
{
return
_gpsManager
;
}
...
...
@@ -86,7 +86,7 @@ private:
FollowMe
*
_followMe
;
QGCPositionManager
*
_qgcPositionManager
;
VideoManager
*
_videoManager
;
M
avl
inkLogManager
*
_mavlinkLogManager
;
M
AVL
inkLogManager
*
_mavlinkLogManager
;
friend
class
QGCApplication
;
};
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
f1aee303
...
...
@@ -72,7 +72,7 @@ public:
Q_PROPERTY
(
QGCPositionManager
*
qgcPositionManger
READ
qgcPositionManger
CONSTANT
)
Q_PROPERTY
(
MissionCommandTree
*
missionCommandTree
READ
missionCommandTree
CONSTANT
)
Q_PROPERTY
(
VideoManager
*
videoManager
READ
videoManager
CONSTANT
)
Q_PROPERTY
(
M
avl
inkLogManager
*
mavlinkLogManager
READ
mavlinkLogManager
CONSTANT
)
Q_PROPERTY
(
M
AVL
inkLogManager
*
mavlinkLogManager
READ
mavlinkLogManager
CONSTANT
)
Q_PROPERTY
(
qreal
zOrderTopMost
READ
zOrderTopMost
CONSTANT
)
///< z order for top most items, toolbar, main window sub view
Q_PROPERTY
(
qreal
zOrderWidgets
READ
zOrderWidgets
CONSTANT
)
///< z order value to widgets, for example: zoom controls, hud widgetss
...
...
@@ -167,7 +167,7 @@ public:
QGCPositionManager
*
qgcPositionManger
()
{
return
_qgcPositionManager
;
}
MissionCommandTree
*
missionCommandTree
()
{
return
_missionCommandTree
;
}
VideoManager
*
videoManager
()
{
return
_videoManager
;
}
M
avl
inkLogManager
*
mavlinkLogManager
()
{
return
_mavlinkLogManager
;
}
M
AVL
inkLogManager
*
mavlinkLogManager
()
{
return
_mavlinkLogManager
;
}
qreal
zOrderTopMost
()
{
return
1000
;
}
qreal
zOrderWidgets
()
{
return
100
;
}
...
...
@@ -239,7 +239,7 @@ private:
QGCPositionManager
*
_qgcPositionManager
;
MissionCommandTree
*
_missionCommandTree
;
VideoManager
*
_videoManager
;
M
avl
inkLogManager
*
_mavlinkLogManager
;
M
AVL
inkLogManager
*
_mavlinkLogManager
;
bool
_virtualTabletJoystick
;
qreal
_baseFontPointSize
;
...
...
src/Vehicle/M
avl
inkLogManager.cc
→
src/Vehicle/M
AVL
inkLogManager.cc
View file @
f1aee303
...
...
@@ -7,7 +7,7 @@
*
****************************************************************************/
#include "M
avl
inkLogManager.h"
#include "M
AVL
inkLogManager.h"
#include "QGCApplication.h"
#include <QQmlContext>
#include <QQmlProperty>
...
...
@@ -21,7 +21,7 @@
#define kTimeOutMilliseconds 1000
QGC_LOGGING_CATEGORY
(
M
avlinkLogManagerLog
,
"Mavl
inkLogManagerLog"
)
QGC_LOGGING_CATEGORY
(
M
AVLinkLogManagerLog
,
"MAVL
inkLogManagerLog"
)
static
const
char
*
kEmailAddressKey
=
"MAVLinkLogEmail"
;
static
const
char
*
kDescriptionsKey
=
"MAVLinkLogDescription"
;
...
...
@@ -35,7 +35,7 @@ static const char* kUlogExtension = ".ulg";
static
const
char
*
kSidecarExtension
=
".uploaded"
;
//-----------------------------------------------------------------------------
M
avlinkLogFiles
::
MavlinkLogFiles
(
Mavl
inkLogManager
*
manager
,
const
QString
&
filePath
,
bool
newFile
)
M
AVLinkLogFiles
::
MAVLinkLogFiles
(
MAVL
inkLogManager
*
manager
,
const
QString
&
filePath
,
bool
newFile
)
:
_manager
(
manager
)
,
_size
(
0
)
,
_selected
(
false
)
...
...
@@ -57,7 +57,7 @@ MavlinkLogFiles::MavlinkLogFiles(MavlinkLogManager* manager, const QString& file
//-----------------------------------------------------------------------------
void
M
avl
inkLogFiles
::
setSize
(
quint32
size
)
M
AVL
inkLogFiles
::
setSize
(
quint32
size
)
{
_size
=
size
;
emit
sizeChanged
();
...
...
@@ -65,7 +65,7 @@ MavlinkLogFiles::setSize(quint32 size)
//-----------------------------------------------------------------------------
void
M
avl
inkLogFiles
::
setSelected
(
bool
selected
)
M
AVL
inkLogFiles
::
setSelected
(
bool
selected
)
{
_selected
=
selected
;
emit
selectedChanged
();
...
...
@@ -74,7 +74,7 @@ MavlinkLogFiles::setSelected(bool selected)
//-----------------------------------------------------------------------------
void
M
avl
inkLogFiles
::
setUploading
(
bool
uploading
)
M
AVL
inkLogFiles
::
setUploading
(
bool
uploading
)
{
_uploading
=
uploading
;
emit
uploadingChanged
();
...
...
@@ -82,7 +82,7 @@ MavlinkLogFiles::setUploading(bool uploading)
//-----------------------------------------------------------------------------
void
M
avl
inkLogFiles
::
setProgress
(
qreal
progress
)
M
AVL
inkLogFiles
::
setProgress
(
qreal
progress
)
{
_progress
=
progress
;
emit
progressChanged
();
...
...
@@ -90,7 +90,7 @@ MavlinkLogFiles::setProgress(qreal progress)
//-----------------------------------------------------------------------------
void
M
avl
inkLogFiles
::
setWriting
(
bool
writing
)
M
AVL
inkLogFiles
::
setWriting
(
bool
writing
)
{
_writing
=
writing
;
emit
writingChanged
();
...
...
@@ -98,7 +98,7 @@ MavlinkLogFiles::setWriting(bool writing)
//-----------------------------------------------------------------------------
void
M
avl
inkLogFiles
::
setUploaded
(
bool
uploaded
)
M
AVL
inkLogFiles
::
setUploaded
(
bool
uploaded
)
{
_uploaded
=
uploaded
;
emit
uploadedChanged
();
...
...
@@ -106,7 +106,7 @@ MavlinkLogFiles::setUploaded(bool uploaded)
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
M
avlinkLogProcessor
::
Mavl
inkLogProcessor
()
M
AVLinkLogProcessor
::
MAVL
inkLogProcessor
()
:
_fd
(
NULL
)
,
_written
(
0
)
,
_sequence
(
-
1
)
...
...
@@ -118,14 +118,14 @@ MavlinkLogProcessor::MavlinkLogProcessor()
}
//-----------------------------------------------------------------------------
M
avlinkLogProcessor
::~
Mavl
inkLogProcessor
()
M
AVLinkLogProcessor
::~
MAVL
inkLogProcessor
()
{
close
();
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogProcessor
::
close
()
M
AVL
inkLogProcessor
::
close
()
{
if
(
_fd
)
{
fclose
(
_fd
);
...
...
@@ -135,14 +135,14 @@ MavlinkLogProcessor::close()
//-----------------------------------------------------------------------------
bool
M
avl
inkLogProcessor
::
valid
()
M
AVL
inkLogProcessor
::
valid
()
{
return
(
_fd
!=
NULL
)
&&
(
_record
!=
NULL
);
}
//-----------------------------------------------------------------------------
bool
M
avlinkLogProcessor
::
create
(
Mavl
inkLogManager
*
manager
,
const
QString
path
,
uint8_t
id
)
M
AVLinkLogProcessor
::
create
(
MAVL
inkLogManager
*
manager
,
const
QString
path
,
uint8_t
id
)
{
_fileName
.
sprintf
(
"%s/%03d-%s%s"
,
path
.
toLatin1
().
data
(),
...
...
@@ -151,7 +151,7 @@ MavlinkLogProcessor::create(MavlinkLogManager* manager, const QString path, uint
kUlogExtension
);
_fd
=
fopen
(
_fileName
.
toLatin1
().
data
(),
"wb"
);
if
(
_fd
)
{
_record
=
new
M
avl
inkLogFiles
(
manager
,
_fileName
,
true
);
_record
=
new
M
AVL
inkLogFiles
(
manager
,
_fileName
,
true
);
_record
->
setWriting
(
true
);
_sequence
=
-
1
;
return
true
;
...
...
@@ -161,7 +161,7 @@ MavlinkLogProcessor::create(MavlinkLogManager* manager, const QString path, uint
//-----------------------------------------------------------------------------
bool
M
avl
inkLogProcessor
::
_checkSequence
(
uint16_t
seq
,
int
&
num_drops
)
M
AVL
inkLogProcessor
::
_checkSequence
(
uint16_t
seq
,
int
&
num_drops
)
{
num_drops
=
0
;
//-- Check if a sequence is newer than the one previously received and if
...
...
@@ -195,7 +195,7 @@ MavlinkLogProcessor::_checkSequence(uint16_t seq, int& num_drops)
//-----------------------------------------------------------------------------
void
M
avl
inkLogProcessor
::
_writeData
(
void
*
data
,
int
len
)
M
AVL
inkLogProcessor
::
_writeData
(
void
*
data
,
int
len
)
{
if
(
!
_error
)
{
_error
=
fwrite
(
data
,
1
,
len
,
_fd
)
!=
(
size_t
)
len
;
...
...
@@ -205,14 +205,14 @@ MavlinkLogProcessor::_writeData(void* data, int len)
_record
->
setSize
(
_written
);
}
}
else
{
qCDebug
(
M
avl
inkLogManagerLog
)
<<
"File IO error:"
<<
len
<<
"bytes into"
<<
_fileName
;
qCDebug
(
M
AVL
inkLogManagerLog
)
<<
"File IO error:"
<<
len
<<
"bytes into"
<<
_fileName
;
}
}
}
//-----------------------------------------------------------------------------
QByteArray
M
avl
inkLogProcessor
::
_writeUlogMessage
(
QByteArray
&
data
)
M
AVL
inkLogProcessor
::
_writeUlogMessage
(
QByteArray
&
data
)
{
//-- Write ulog data w/o integrity checking, assuming data starts with a
// valid ulog message. returns the remaining data at the end.
...
...
@@ -230,7 +230,7 @@ MavlinkLogProcessor::_writeUlogMessage(QByteArray& data)
//-----------------------------------------------------------------------------
bool
M
avl
inkLogProcessor
::
processStreamData
(
uint16_t
sequence
,
uint8_t
first_message
,
QByteArray
data
)
M
AVL
inkLogProcessor
::
processStreamData
(
uint16_t
sequence
,
uint8_t
first_message
,
QByteArray
data
)
{
int
num_drops
=
0
;
_error
=
false
;
...
...
@@ -239,7 +239,7 @@ MavlinkLogProcessor::processStreamData(uint16_t sequence, uint8_t first_message,
if
(
!
_gotHeader
)
{
if
(
data
.
size
()
<
16
)
{
//-- Shouldn't happen but if it does, we might as well close shop.
qCCritical
(
M
avl
inkLogManagerLog
)
<<
"Corrupt log header. Canceling log download."
;
qCCritical
(
M
AVL
inkLogManagerLog
)
<<
"Corrupt log header. Canceling log download."
;
return
false
;
}
//-- Write header
...
...
@@ -291,7 +291,7 @@ MavlinkLogProcessor::processStreamData(uint16_t sequence, uint8_t first_message,
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
M
avlinkLogManager
::
Mavl
inkLogManager
(
QGCApplication
*
app
)
M
AVLinkLogManager
::
MAVL
inkLogManager
(
QGCApplication
*
app
)
:
QGCTool
(
app
)
,
_enableAutoUpload
(
true
)
,
_enableAutoStart
(
true
)
...
...
@@ -314,10 +314,10 @@ MavlinkLogManager::MavlinkLogManager(QGCApplication* app)
setDeleteAfterUpload
(
settings
.
value
(
kEnableDeletetKey
,
false
).
toBool
());
//-- Logging location
_logPath
=
QStandardPaths
::
writableLocation
(
QStandardPaths
::
AppDataLocation
);
_logPath
+=
"/M
avl
inkLogs"
;
_logPath
+=
"/M
AVL
inkLogs"
;
if
(
!
QDir
(
_logPath
).
exists
())
{
if
(
!
QDir
().
mkpath
(
_logPath
))
{
qCCritical
(
M
avlinkLogManagerLog
)
<<
"Could not create Mavl
ink log download path:"
<<
_logPath
;
qCCritical
(
M
AVLinkLogManagerLog
)
<<
"Could not create MAVL
ink log download path:"
<<
_logPath
;
_loggingDisabled
=
true
;
}
}
...
...
@@ -327,34 +327,34 @@ MavlinkLogManager::MavlinkLogManager(QGCApplication* app)
filter
+=
kUlogExtension
;
QDirIterator
it
(
_logPath
,
QStringList
()
<<
filter
,
QDir
::
Files
);
while
(
it
.
hasNext
())
{
_insertNewLog
(
new
M
avl
inkLogFiles
(
this
,
it
.
next
()));
_insertNewLog
(
new
M
AVL
inkLogFiles
(
this
,
it
.
next
()));
}
qCDebug
(
M
avl
inkLogManagerLog
)
<<
"MAVLink logs directory:"
<<
_logPath
;
qCDebug
(
M
AVL
inkLogManagerLog
)
<<
"MAVLink logs directory:"
<<
_logPath
;
}
}
//-----------------------------------------------------------------------------
M
avlinkLogManager
::~
Mavl
inkLogManager
()
M
AVLinkLogManager
::~
MAVL
inkLogManager
()
{
_logFiles
.
clear
();
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
setToolbox
(
QGCToolbox
*
toolbox
)
M
AVL
inkLogManager
::
setToolbox
(
QGCToolbox
*
toolbox
)
{
QGCTool
::
setToolbox
(
toolbox
);
QQmlEngine
::
setObjectOwnership
(
this
,
QQmlEngine
::
CppOwnership
);
qmlRegisterUncreatableType
<
M
avlinkLogManager
>
(
"QGroundControl.MavlinkLogManager"
,
1
,
0
,
"Mavl
inkLogManager"
,
"Reference only"
);
qmlRegisterUncreatableType
<
M
AVLinkLogManager
>
(
"QGroundControl.MAVLinkLogManager"
,
1
,
0
,
"MAVL
inkLogManager"
,
"Reference only"
);
if
(
!
_loggingDisabled
)
{
connect
(
toolbox
->
multiVehicleManager
(),
&
MultiVehicleManager
::
activeVehicleChanged
,
this
,
&
M
avl
inkLogManager
::
_activeVehicleChanged
);
connect
(
&
_ackTimer
,
&
QTimer
::
timeout
,
this
,
&
M
avl
inkLogManager
::
_processCmdAck
);
connect
(
toolbox
->
multiVehicleManager
(),
&
MultiVehicleManager
::
activeVehicleChanged
,
this
,
&
M
AVL
inkLogManager
::
_activeVehicleChanged
);
connect
(
&
_ackTimer
,
&
QTimer
::
timeout
,
this
,
&
M
AVL
inkLogManager
::
_processCmdAck
);
}
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
setEmailAddress
(
QString
email
)
M
AVL
inkLogManager
::
setEmailAddress
(
QString
email
)
{
_emailAddress
=
email
;
QSettings
settings
;
...
...
@@ -364,7 +364,7 @@ MavlinkLogManager::setEmailAddress(QString email)
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
setDescription
(
QString
description
)
M
AVL
inkLogManager
::
setDescription
(
QString
description
)
{
_description
=
description
;
QSettings
settings
;
...
...
@@ -374,7 +374,7 @@ MavlinkLogManager::setDescription(QString description)
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
setUploadURL
(
QString
url
)
M
AVL
inkLogManager
::
setUploadURL
(
QString
url
)
{
_uploadURL
=
url
;
if
(
_uploadURL
.
isEmpty
())
{
...
...
@@ -387,7 +387,7 @@ MavlinkLogManager::setUploadURL(QString url)
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
setEnableAutoUpload
(
bool
enable
)
M
AVL
inkLogManager
::
setEnableAutoUpload
(
bool
enable
)
{
_enableAutoUpload
=
enable
;
QSettings
settings
;
...
...
@@ -397,7 +397,7 @@ MavlinkLogManager::setEnableAutoUpload(bool enable)
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
setEnableAutoStart
(
bool
enable
)
M
AVL
inkLogManager
::
setEnableAutoStart
(
bool
enable
)
{
_enableAutoStart
=
enable
;
QSettings
settings
;
...
...
@@ -407,7 +407,7 @@ MavlinkLogManager::setEnableAutoStart(bool enable)
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
setDeleteAfterUpload
(
bool
enable
)
M
AVL
inkLogManager
::
setDeleteAfterUpload
(
bool
enable
)
{
_deleteAfterUpload
=
enable
;
QSettings
settings
;
...
...
@@ -417,20 +417,20 @@ MavlinkLogManager::setDeleteAfterUpload(bool enable)
//-----------------------------------------------------------------------------
bool
M
avl
inkLogManager
::
uploading
()
M
AVL
inkLogManager
::
uploading
()
{
return
_currentLogfile
!=
NULL
;
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
uploadLog
()
M
AVL
inkLogManager
::
uploadLog
()
{
if
(
_currentLogfile
)
{
_currentLogfile
->
setUploading
(
false
);
}
for
(
int
i
=
0
;
i
<
_logFiles
.
count
();
i
++
)
{
_currentLogfile
=
qobject_cast
<
M
avl
inkLogFiles
*>
(
_logFiles
.
get
(
i
));
_currentLogfile
=
qobject_cast
<
M
AVL
inkLogFiles
*>
(
_logFiles
.
get
(
i
));
Q_ASSERT
(
_currentLogfile
);
if
(
_currentLogfile
->
selected
())
{
_currentLogfile
->
setSelected
(
false
);
...
...
@@ -450,7 +450,7 @@ MavlinkLogManager::uploadLog()
//-----------------------------------------------------------------------------
void
M
avlinkLogManager
::
_insertNewLog
(
Mavl
inkLogFiles
*
newLog
)
M
AVLinkLogManager
::
_insertNewLog
(
MAVL
inkLogFiles
*
newLog
)
{
//-- Simpler than trying to sort this thing
int
count
=
_logFiles
.
count
();
...
...
@@ -458,7 +458,7 @@ MavlinkLogManager::_insertNewLog(MavlinkLogFiles* newLog)
_logFiles
.
append
(
newLog
);
}
else
{
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
M
avlinkLogFiles
*
f
=
qobject_cast
<
Mavl
inkLogFiles
*>
(
_logFiles
.
get
(
i
));
M
AVLinkLogFiles
*
f
=
qobject_cast
<
MAVL
inkLogFiles
*>
(
_logFiles
.
get
(
i
));
if
(
newLog
->
name
()
<
f
->
name
())
{
_logFiles
.
insert
(
i
,
newLog
);
return
;
...
...
@@ -470,10 +470,10 @@ MavlinkLogManager::_insertNewLog(MavlinkLogFiles* newLog)
//-----------------------------------------------------------------------------
int
M
avl
inkLogManager
::
_getFirstSelected
()
M
AVL
inkLogManager
::
_getFirstSelected
()
{
for
(
int
i
=
0
;
i
<
_logFiles
.
count
();
i
++
)
{
M
avlinkLogFiles
*
f
=
qobject_cast
<
Mavl
inkLogFiles
*>
(
_logFiles
.
get
(
i
));
M
AVLinkLogFiles
*
f
=
qobject_cast
<
MAVL
inkLogFiles
*>
(
_logFiles
.
get
(
i
));
Q_ASSERT
(
f
);
if
(
f
->
selected
())
{
return
i
;
...
...
@@ -484,26 +484,26 @@ MavlinkLogManager::_getFirstSelected()
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
deleteLog
()
M
AVL
inkLogManager
::
deleteLog
()
{
while
(
true
)
{
int
idx
=
_getFirstSelected
();
if
(
idx
<
0
)
{
break
;
}
M
avlinkLogFiles
*
log
=
qobject_cast
<
Mavl
inkLogFiles
*>
(
_logFiles
.
get
(
idx
));
M
AVLinkLogFiles
*
log
=
qobject_cast
<
MAVL
inkLogFiles
*>
(
_logFiles
.
get
(
idx
));
_deleteLog
(
log
);
}
}
//-----------------------------------------------------------------------------
void
M
avlinkLogManager
::
_deleteLog
(
Mavl
inkLogFiles
*
log
)
M
AVLinkLogManager
::
_deleteLog
(
MAVL
inkLogFiles
*
log
)
{
QString
filePath
=
_makeFilename
(
log
->
name
());
QFile
gone
(
filePath
);
if
(
!
gone
.
remove
())
{
qCWarning
(
M
avlinkLogManagerLog
)
<<
"Could not delete Mavl
ink log file:"
<<
_logPath
;
qCWarning
(
M
AVLinkLogManagerLog
)
<<
"Could not delete MAVL
ink log file:"
<<
_logPath
;
}
//-- Remove sidecar file (if any)
filePath
.
replace
(
kUlogExtension
,
kSidecarExtension
);
...
...
@@ -519,10 +519,10 @@ MavlinkLogManager::_deleteLog(MavlinkLogFiles* log)
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
cancelUpload
()
M
AVL
inkLogManager
::
cancelUpload
()
{
for
(
int
i
=
0
;
i
<
_logFiles
.
count
();
i
++
)
{
M
avlinkLogFiles
*
pLogFile
=
qobject_cast
<
Mavl
inkLogFiles
*>
(
_logFiles
.
get
(
i
));
M
AVLinkLogFiles
*
pLogFile
=
qobject_cast
<
MAVL
inkLogFiles
*>
(
_logFiles
.
get
(
i
));
Q_ASSERT
(
pLogFile
);
if
(
pLogFile
->
selected
()
&&
pLogFile
!=
_currentLogfile
)
{
pLogFile
->
setSelected
(
false
);
...
...
@@ -535,7 +535,7 @@ MavlinkLogManager::cancelUpload()
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
startLogging
()
M
AVL
inkLogManager
::
startLogging
()
{
if
(
_vehicle
)
{
if
(
_createNewLog
())
{
...
...
@@ -550,7 +550,7 @@ MavlinkLogManager::startLogging()
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
stopLogging
()
M
AVL
inkLogManager
::
stopLogging
()
{
if
(
_vehicle
)
{
//-- Tell vehicle to stop sending logs
...
...
@@ -592,24 +592,24 @@ create_form_part(const QString& name, const QString& value)
//-----------------------------------------------------------------------------
bool
M
avl
inkLogManager
::
_sendLog
(
const
QString
&
logFile
)
M
AVL
inkLogManager
::
_sendLog
(
const
QString
&
logFile
)
{
QString
defaultDescription
=
_description
;
if
(
_description
.
isEmpty
())
{
qCWarning
(
M
avl
inkLogManagerLog
)
<<
"Log description missing. Using defaults."
;
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
"Log description missing. Using defaults."
;
defaultDescription
=
kDefaultDescr
;
}
if
(
_emailAddress
.
isEmpty
())
{
qCCritical
(
M
avl
inkLogManagerLog
)
<<
"User email missing."
;
qCCritical
(
M
AVL
inkLogManagerLog
)
<<
"User email missing."
;
return
false
;
}
if
(
_uploadURL
.
isEmpty
())
{
qCCritical
(
M
avl
inkLogManagerLog
)
<<
"Upload URL missing."
;
qCCritical
(
M
AVL
inkLogManagerLog
)
<<
"Upload URL missing."
;
return
false
;
}
QFileInfo
fi
(
logFile
);
if
(
!
fi
.
exists
())
{
qCCritical
(
M
avl
inkLogManagerLog
)
<<
"Log file missing:"
<<
logFile
;
qCCritical
(
M
AVL
inkLogManagerLog
)
<<
"Log file missing:"
<<
logFile
;
return
false
;
}
QFile
*
file
=
new
QFile
(
logFile
);
...
...
@@ -617,7 +617,7 @@ MavlinkLogManager::_sendLog(const QString& logFile)
if
(
file
)
{
delete
file
;
}
qCCritical
(
M
avl
inkLogManagerLog
)
<<
"Could not open log file:"
<<
logFile
;
qCCritical
(
M
AVL
inkLogManagerLog
)
<<
"Could not open log file:"
<<
logFile
;
return
false
;
}
if
(
!
_nam
)
{
...
...
@@ -649,40 +649,40 @@ MavlinkLogManager::_sendLog(const QString& logFile)
request
.
setAttribute
(
QNetworkRequest
::
FollowRedirectsAttribute
,
true
);
#endif
QNetworkReply
*
reply
=
_nam
->
post
(
request
,
multiPart
);
connect
(
reply
,
&
QNetworkReply
::
finished
,
this
,
&
M
avl
inkLogManager
::
_uploadFinished
);
connect
(
this
,
&
M
avl
inkLogManager
::
abortUpload
,
reply
,
&
QNetworkReply
::
abort
);
//connect(reply, &QNetworkReply::readyRead, this, &M
avl
inkLogManager::_dataAvailable);
connect
(
reply
,
&
QNetworkReply
::
uploadProgress
,
this
,
&
M
avl
inkLogManager
::
_uploadProgress
);
connect
(
reply
,
&
QNetworkReply
::
finished
,
this
,
&
M
AVL
inkLogManager
::
_uploadFinished
);
connect
(
this
,
&
M
AVL
inkLogManager
::
abortUpload
,
reply
,
&
QNetworkReply
::
abort
);
//connect(reply, &QNetworkReply::readyRead, this, &M
AVL
inkLogManager::_dataAvailable);
connect
(
reply
,
&
QNetworkReply
::
uploadProgress
,
this
,
&
M
AVL
inkLogManager
::
_uploadProgress
);
multiPart
->
setParent
(
reply
);
qCDebug
(
M
avl
inkLogManagerLog
)
<<
"Log"
<<
fi
.
baseName
()
<<
"Uploading."
<<
fi
.
size
()
<<
"bytes."
;
qCDebug
(
M
AVL
inkLogManagerLog
)
<<
"Log"
<<
fi
.
baseName
()
<<
"Uploading."
<<
fi
.
size
()
<<
"bytes."
;
_nam
->
setProxy
(
savedProxy
);
return
true
;
}
//-----------------------------------------------------------------------------
bool
M
avl
inkLogManager
::
_processUploadResponse
(
int
http_code
,
QByteArray
&
data
)
M
AVL
inkLogManager
::
_processUploadResponse
(
int
http_code
,
QByteArray
&
data
)
{
qCDebug
(
M
avl
inkLogManagerLog
)
<<
"Uploaded response:"
<<
QString
::
fromUtf8
(
data
);
qCDebug
(
M
AVL
inkLogManagerLog
)
<<
"Uploaded response:"
<<
QString
::
fromUtf8
(
data
);
emit
readyRead
(
data
);
return
http_code
==
200
;
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_dataAvailable
()
M
AVL
inkLogManager
::
_dataAvailable
()
{
QNetworkReply
*
reply
=
qobject_cast
<
QNetworkReply
*>
(
sender
());
if
(
!
reply
)
{
return
;
}
QByteArray
data
=
reply
->
readAll
();
qCDebug
(
M
avl
inkLogManagerLog
)
<<
"Uploaded response data:"
<<
QString
::
fromUtf8
(
data
);
qCDebug
(
M
AVL
inkLogManagerLog
)
<<
"Uploaded response data:"
<<
QString
::
fromUtf8
(
data
);
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_uploadFinished
()
M
AVL
inkLogManager
::
_uploadFinished
()
{
QNetworkReply
*
reply
=
qobject_cast
<
QNetworkReply
*>
(
sender
());
if
(
!
reply
)
{
...
...
@@ -691,7 +691,7 @@ MavlinkLogManager::_uploadFinished()
const
int
http_code
=
reply
->
attribute
(
QNetworkRequest
::
HttpStatusCodeAttribute
).
toInt
();
QByteArray
data
=
reply
->
readAll
();
if
(
_processUploadResponse
(
http_code
,
data
))
{
qCDebug
(
M
avl
inkLogManagerLog
)
<<
"Log uploaded."
;
qCDebug
(
M
AVL
inkLogManagerLog
)
<<
"Log uploaded."
;
emit
succeed
();
if
(
_deleteAfterUpload
)
{
if
(
_currentLogfile
)
{
...
...
@@ -711,7 +711,7 @@ MavlinkLogManager::_uploadFinished()
}
}
}
else
{
qCWarning
(
M
avl
inkLogManagerLog
)
<<
QString
(
"Log Upload Error: %1 status: %2"
).
arg
(
reply
->
errorString
(),
reply
->
attribute
(
QNetworkRequest
::
HttpStatusCodeAttribute
).
toString
());
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
QString
(
"Log Upload Error: %1 status: %2"
).
arg
(
reply
->
errorString
(),
reply
->
attribute
(
QNetworkRequest
::
HttpStatusCodeAttribute
).
toString
());
emit
failed
();
}
reply
->
deleteLater
();
...
...
@@ -721,7 +721,7 @@ MavlinkLogManager::_uploadFinished()
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_uploadProgress
(
qint64
bytesSent
,
qint64
bytesTotal
)
M
AVL
inkLogManager
::
_uploadProgress
(
qint64
bytesSent
,
qint64
bytesTotal
)
{
if
(
bytesTotal
)
{
qreal
progress
=
(
qreal
)
bytesSent
/
(
qreal
)
bytesTotal
;
...
...
@@ -729,12 +729,12 @@ MavlinkLogManager::_uploadProgress(qint64 bytesSent, qint64 bytesTotal)
_currentLogfile
->
setProgress
(
progress
);
}
}
qCDebug
(
M
avl
inkLogManagerLog
)
<<
bytesSent
<<
"of"
<<
bytesTotal
;
qCDebug
(
M
AVL
inkLogManagerLog
)
<<
bytesSent
<<
"of"
<<
bytesTotal
;
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_activeVehicleChanged
(
Vehicle
*
vehicle
)
M
AVL
inkLogManager
::
_activeVehicleChanged
(
Vehicle
*
vehicle
)
{
//-- TODO: This is not quite right. This is being used to detect when a vehicle
// connects/disconnects. In reality, if QGC is connected to multiple vehicles,
...
...
@@ -743,9 +743,9 @@ MavlinkLogManager::_activeVehicleChanged(Vehicle* vehicle)
// For now, we only handle one log download at a time.
// Disconnect the previous one (if any)
if
(
_vehicle
)
{
disconnect
(
_vehicle
,
&
Vehicle
::
armedChanged
,
this
,
&
M
avl
inkLogManager
::
_armedChanged
);
disconnect
(
_vehicle
,
&
Vehicle
::
mavlinkLogData
,
this
,
&
M
avl
inkLogManager
::
_mavlinkLogData
);
disconnect
(
_vehicle
,
&
Vehicle
::
commandLongAck
,
this
,
&
M
avl
inkLogManager
::
_commandLongAck
);
disconnect
(
_vehicle
,
&
Vehicle
::
armedChanged
,
this
,
&
M
AVL
inkLogManager
::
_armedChanged
);
disconnect
(
_vehicle
,
&
Vehicle
::
mavlinkLogData
,
this
,
&
M
AVL
inkLogManager
::
_mavlinkLogData
);
disconnect
(
_vehicle
,
&
Vehicle
::
commandLongAck
,
this
,
&
M
AVL
inkLogManager
::
_commandLongAck
);
_vehicle
=
NULL
;
//-- Stop logging (if that's the case)
stopLogging
();
...
...
@@ -754,34 +754,34 @@ MavlinkLogManager::_activeVehicleChanged(Vehicle* vehicle)
// Connect new system
if
(
vehicle
)
{
_vehicle
=
vehicle
;
connect
(
_vehicle
,
&
Vehicle
::
armedChanged
,
this
,
&
M
avl
inkLogManager
::
_armedChanged
);
connect
(
_vehicle
,
&
Vehicle
::
mavlinkLogData
,
this
,
&
M
avl
inkLogManager
::
_mavlinkLogData
);
connect
(
_vehicle
,
&
Vehicle
::
commandLongAck
,
this
,
&
M
avl
inkLogManager
::
_commandLongAck
);
connect
(
_vehicle
,
&
Vehicle
::
armedChanged
,
this
,
&
M
AVL
inkLogManager
::
_armedChanged
);
connect
(
_vehicle
,
&
Vehicle
::
mavlinkLogData
,
this
,
&
M
AVL
inkLogManager
::
_mavlinkLogData
);
connect
(
_vehicle
,
&
Vehicle
::
commandLongAck
,
this
,
&
M
AVL
inkLogManager
::
_commandLongAck
);
emit
canStartLogChanged
();
}
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_processCmdAck
()
M
AVL
inkLogManager
::
_processCmdAck
()
{
if
(
_loggingCmdTryCount
++
>
3
)
{
_ackTimer
.
stop
();
//-- Give up
if
(
_logRunning
)
{
qCWarning
(
M
avl
inkLogManagerLog
)
<<
"Start MAVLink log command had no response."
;
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
"Start MAVLink log command had no response."
;
_discardLog
();
}
else
{
qCWarning
(
M
avl
inkLogManagerLog
)
<<
"Stop MAVLink log command had no response."
;
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
"Stop MAVLink log command had no response."
;
}
}
else
{
if
(
_vehicle
)
{
if
(
_logRunning
)
{
_vehicle
->
startMavlinkLog
();
qCWarning
(
M
avl
inkLogManagerLog
)
<<
"Start MAVLink log command sent again."
;
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
"Start MAVLink log command sent again."
;
}
else
{
_vehicle
->
stopMavlinkLog
();
qCWarning
(
M
avl
inkLogManagerLog
)
<<
"Stop MAVLink log command sent again."
;
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
"Stop MAVLink log command sent again."
;
}
_ackTimer
.
start
(
kTimeOutMilliseconds
);
}
else
{
...
...
@@ -793,7 +793,7 @@ MavlinkLogManager::_processCmdAck()
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_mavlinkLogData
(
Vehicle
*
/*vehicle*/
,
uint8_t
/*target_system*/
,
uint8_t
/*target_component*/
,
uint16_t
sequence
,
uint8_t
first_message
,
QByteArray
data
,
bool
/*acked*/
)
M
AVL
inkLogManager
::
_mavlinkLogData
(
Vehicle
*
/*vehicle*/
,
uint8_t
/*target_system*/
,
uint8_t
/*target_component*/
,
uint16_t
sequence
,
uint8_t
first_message
,
QByteArray
data
,
bool
/*acked*/
)
{
//-- Disable timer if we got a message before an ACK for the start command
if
(
_logRunning
)
{
...
...
@@ -801,7 +801,7 @@ MavlinkLogManager::_mavlinkLogData(Vehicle* /*vehicle*/, uint8_t /*target_system
}
if
(
_logProcessor
&&
_logProcessor
->
valid
())
{
if
(
!
_logProcessor
->
processStreamData
(
sequence
,
first_message
,
data
))
{
qCCritical
(
M
avlinkLogManagerLog
)
<<
"Error writing Mavl
ink log file:"
<<
_logProcessor
->
fileName
();
qCCritical
(
M
AVLinkLogManagerLog
)
<<
"Error writing MAVL
ink log file:"
<<
_logProcessor
->
fileName
();
delete
_logProcessor
;
_logProcessor
=
NULL
;
_logRunning
=
false
;
...
...
@@ -809,13 +809,13 @@ MavlinkLogManager::_mavlinkLogData(Vehicle* /*vehicle*/, uint8_t /*target_system
emit
logRunningChanged
();
}
}
else
{
qCWarning
(
M
avl
inkLogManagerLog
)
<<
"MAVLink log data received when not expected."
;
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
"MAVLink log data received when not expected."
;
}
}
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_commandLongAck
(
uint8_t
/*compID*/
,
uint16_t
command
,
uint8_t
result
)
M
AVL
inkLogManager
::
_commandLongAck
(
uint8_t
/*compID*/
,
uint16_t
command
,
uint8_t
result
)
{
if
(
command
==
MAV_CMD_LOGGING_START
||
command
==
MAV_CMD_LOGGING_STOP
)
{
_ackTimer
.
stop
();
...
...
@@ -823,10 +823,10 @@ MavlinkLogManager::_commandLongAck(uint8_t /*compID*/, uint16_t command, uint8_t
if
(
result
)
{
if
(
command
==
MAV_CMD_LOGGING_STOP
)
{
//-- Not that it could happen but...
qCWarning
(
M
avl
inkLogManagerLog
)
<<
"Stop MAVLink log command failed."
;
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
"Stop MAVLink log command failed."
;
}
else
{
//-- Could not start logging for some reason.
qCWarning
(
M
avl
inkLogManagerLog
)
<<
"Start MAVLink log command failed."
;
qCWarning
(
M
AVL
inkLogManagerLog
)
<<
"Start MAVLink log command failed."
;
_discardLog
();
}
}
...
...
@@ -835,7 +835,7 @@ MavlinkLogManager::_commandLongAck(uint8_t /*compID*/, uint16_t command, uint8_t
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_discardLog
()
M
AVL
inkLogManager
::
_discardLog
()
{
//-- Delete (empty) log file (and record)
if
(
_logProcessor
)
{
...
...
@@ -852,18 +852,18 @@ MavlinkLogManager::_discardLog()
//-----------------------------------------------------------------------------
bool
M
avl
inkLogManager
::
_createNewLog
()
M
AVL
inkLogManager
::
_createNewLog
()
{
if
(
_logProcessor
)
{
delete
_logProcessor
;
_logProcessor
=
NULL
;
}
_logProcessor
=
new
M
avl
inkLogProcessor
;
_logProcessor
=
new
M
AVL
inkLogProcessor
;
if
(
_logProcessor
->
create
(
this
,
_logPath
,
_vehicle
->
id
()))
{
_insertNewLog
(
_logProcessor
->
record
());
emit
logFilesChanged
();
}
else
{
qCCritical
(
M
avlinkLogManagerLog
)
<<
"Could not create Mavl
ink log file:"
<<
_logProcessor
->
fileName
();
qCCritical
(
M
AVLinkLogManagerLog
)
<<
"Could not create MAVL
ink log file:"
<<
_logProcessor
->
fileName
();
delete
_logProcessor
;
_logProcessor
=
NULL
;
}
...
...
@@ -872,7 +872,7 @@ MavlinkLogManager::_createNewLog()
//-----------------------------------------------------------------------------
void
M
avl
inkLogManager
::
_armedChanged
(
bool
armed
)
M
AVL
inkLogManager
::
_armedChanged
(
bool
armed
)
{
if
(
_vehicle
)
{
if
(
armed
)
{
...
...
@@ -889,7 +889,7 @@ MavlinkLogManager::_armedChanged(bool armed)
//-----------------------------------------------------------------------------
QString
M
avl
inkLogManager
::
_makeFilename
(
const
QString
&
baseName
)
M
AVL
inkLogManager
::
_makeFilename
(
const
QString
&
baseName
)
{
QString
filePath
=
_logPath
;
filePath
+=
"/"
;
...
...
src/Vehicle/M
avl
inkLogManager.h
→
src/Vehicle/M
AVL
inkLogManager.h
View file @
f1aee303
...
...
@@ -8,8 +8,8 @@
****************************************************************************/
#ifndef M
avl
inkLogManager_H
#define M
avl
inkLogManager_H
#ifndef M
AVL
inkLogManager_H
#define M
AVL
inkLogManager_H
#include <QObject>
...
...
@@ -18,17 +18,17 @@
#include "QGCToolbox.h"
#include "Vehicle.h"
Q_DECLARE_LOGGING_CATEGORY
(
M
avl
inkLogManagerLog
)
Q_DECLARE_LOGGING_CATEGORY
(
M
AVL
inkLogManagerLog
)
class
QNetworkAccessManager
;
class
M
avl
inkLogManager
;
class
M
AVL
inkLogManager
;
//-----------------------------------------------------------------------------
class
M
avl
inkLogFiles
:
public
QObject
class
M
AVL
inkLogFiles
:
public
QObject
{
Q_OBJECT
public:
M
avlinkLogFiles
(
Mavl
inkLogManager
*
manager
,
const
QString
&
filePath
,
bool
newFile
=
false
);
M
AVLinkLogFiles
(
MAVL
inkLogManager
*
manager
,
const
QString
&
filePath
,
bool
newFile
=
false
);
Q_PROPERTY
(
QString
name
READ
name
CONSTANT
)
Q_PROPERTY
(
quint32
size
READ
size
NOTIFY
sizeChanged
)
...
...
@@ -62,7 +62,7 @@ signals:
void
uploadedChanged
();
private:
M
avl
inkLogManager
*
_manager
;
M
AVL
inkLogManager
*
_manager
;
QString
_name
;
quint32
_size
;
bool
_selected
;
...
...
@@ -73,15 +73,15 @@ private:
};
//-----------------------------------------------------------------------------
class
M
avl
inkLogProcessor
class
M
AVL
inkLogProcessor
{
public:
M
avl
inkLogProcessor
();
~
M
avl
inkLogProcessor
();
M
AVL
inkLogProcessor
();
~
M
AVL
inkLogProcessor
();
void
close
();
bool
valid
();
bool
create
(
M
avl
inkLogManager
*
manager
,
const
QString
path
,
uint8_t
id
);
M
avl
inkLogFiles
*
record
()
{
return
_record
;
}
bool
create
(
M
AVL
inkLogManager
*
manager
,
const
QString
path
,
uint8_t
id
);
M
AVL
inkLogFiles
*
record
()
{
return
_record
;
}
QString
fileName
()
{
return
_fileName
;
}
bool
processStreamData
(
uint16_t
_sequence
,
uint8_t
first_message
,
QByteArray
data
);
private:
...
...
@@ -97,17 +97,17 @@ private:
bool
_error
;
QByteArray
_ulogMessage
;
QString
_fileName
;
M
avl
inkLogFiles
*
_record
;
M
AVL
inkLogFiles
*
_record
;
};
//-----------------------------------------------------------------------------
class
M
avl
inkLogManager
:
public
QGCTool
class
M
AVL
inkLogManager
:
public
QGCTool
{
Q_OBJECT
public:
M
avl
inkLogManager
(
QGCApplication
*
app
);
~
M
avl
inkLogManager
();
M
AVL
inkLogManager
(
QGCApplication
*
app
);
~
M
AVL
inkLogManager
();
Q_PROPERTY
(
QString
emailAddress
READ
emailAddress
WRITE
setEmailAddress
NOTIFY
emailAddressChanged
)
Q_PROPERTY
(
QString
description
READ
description
WRITE
setDescription
NOTIFY
descriptionChanged
)
...
...
@@ -180,8 +180,8 @@ private:
bool
_processUploadResponse
(
int
http_code
,
QByteArray
&
data
);
bool
_createNewLog
();
int
_getFirstSelected
();
void
_insertNewLog
(
M
avl
inkLogFiles
*
newLog
);
void
_deleteLog
(
M
avl
inkLogFiles
*
log
);
void
_insertNewLog
(
M
AVL
inkLogFiles
*
newLog
);
void
_deleteLog
(
M
AVL
inkLogFiles
*
log
);
void
_discardLog
();
QString
_makeFilename
(
const
QString
&
baseName
);
...
...
@@ -194,11 +194,11 @@ private:
bool
_enableAutoStart
;
QNetworkAccessManager
*
_nam
;
QmlObjectListModel
_logFiles
;
M
avl
inkLogFiles
*
_currentLogfile
;
M
AVL
inkLogFiles
*
_currentLogfile
;
Vehicle
*
_vehicle
;
bool
_logRunning
;
bool
_loggingDisabled
;
M
avl
inkLogProcessor
*
_logProcessor
;
M
AVL
inkLogProcessor
*
_logProcessor
;
bool
_deleteAfterUpload
;
int
_loggingCmdTryCount
;
QTimer
_ackTimer
;
...
...
src/ui/preferences/MavlinkSettings.qml
View file @
f1aee303
...
...
@@ -144,7 +144,7 @@ Rectangle {
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCLabel
{
id
:
mavlogLabel
text
:
qsTr
(
"
Vehicle M
avl
ink Logging
"
)
text
:
qsTr
(
"
Vehicle M
AVL
ink Logging
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment