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
68b05a41
Commit
68b05a41
authored
Oct 18, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Plain Diff
Stable merge
parents
f08f4770
833b5e21
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
9 deletions
+67
-9
CodingStyle.h
CodingStyle.h
+1
-4
qgroundcontrol.pro
qgroundcontrol.pro
+2
-0
MissionController.cc
src/MissionManager/MissionController.cc
+3
-4
SurveyMissionItem.cc
src/MissionManager/SurveyMissionItem.cc
+2
-1
Vehicle.cc
src/Vehicle/Vehicle.cc
+2
-0
QGCAudioWorkerTest.cc
src/audio/QGCAudioWorkerTest.cc
+32
-0
QGCAudioWorkerTest.h
src/audio/QGCAudioWorkerTest.h
+23
-0
UnitTestList.cc
src/qgcunittest/UnitTestList.cc
+2
-0
No files found.
CodingStyle.h
View file @
68b05a41
...
...
@@ -11,8 +11,7 @@
// coding style. In general almost everything in here has some coding style meaning.
// Not all style choices are explained.
#ifndef CodingStyle_H
#define CodingStyle_H
#pragma once
#include <QObject>
#include <QMap>
...
...
@@ -79,5 +78,3 @@ private:
static
const
int
_privateStaticVariable
;
};
#endif
qgroundcontrol.pro
View file @
68b05a41
...
...
@@ -413,6 +413,7 @@ DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin {
HEADERS
+=
\
src
/
AnalyzeView
/
LogDownloadTest
.
h
\
src
/
audio
/
QGCAudioWorkerTest
.
h
\
src
/
FactSystem
/
FactSystemTestBase
.
h
\
src
/
FactSystem
/
FactSystemTestGeneric
.
h
\
src
/
FactSystem
/
FactSystemTestPX4
.
h
\
...
...
@@ -448,6 +449,7 @@ DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin {
SOURCES
+=
\
src
/
AnalyzeView
/
LogDownloadTest
.
cc
\
src
/
audio
/
QGCAudioWorkerTest
.
cc
\
src
/
FactSystem
/
FactSystemTestBase
.
cc
\
src
/
FactSystem
/
FactSystemTestGeneric
.
cc
\
src
/
FactSystem
/
FactSystemTestPX4
.
cc
\
...
...
src/MissionManager/MissionController.cc
View file @
68b05a41
...
...
@@ -1546,11 +1546,10 @@ void MissionController::_managerVehicleHomePositionChanged(const QGeoCoordinate&
}
else
{
qWarning
()
<<
"First item is not MissionSettingsItem"
;
}
if
(
_visualItems
->
count
()
==
1
)
{
// Don't let this trip the dirty bit
// Don't let this trip the dirty bit. Otherwise plan will keep getting marked dirty if vehicle home
// changes.
_visualItems
->
setDirty
(
false
);
}
}
}
void
MissionController
::
_inProgressChanged
(
bool
inProgress
)
...
...
src/MissionManager/SurveyMissionItem.cc
View file @
68b05a41
...
...
@@ -116,7 +116,8 @@ SurveyMissionItem::SurveyMissionItem(Vehicle* vehicle, QObject* parent)
// If the user hasn't changed turnaround from the default (which is a fixed wing default) and we are multi-rotor set the multi-rotor default.
// NULL check since object creation during unit testing passes NULL for vehicle
if
(
_vehicle
&&
_vehicle
->
multiRotor
()
&&
_turnaroundDistFact
.
rawValue
().
toDouble
()
==
_turnaroundDistFact
.
rawDefaultValue
().
toDouble
())
{
_turnaroundDistFact
.
setRawValue
(
5
);
// Note this is set to 10 meters to work around a problem with PX4 Pro turnaround behavior. Don't change unless firmware gets better as well.
_turnaroundDistFact
.
setRawValue
(
10
);
}
// We override the grid altitude to the mission default
...
...
src/Vehicle/Vehicle.cc
View file @
68b05a41
...
...
@@ -678,6 +678,8 @@ void Vehicle::_mavlinkMessageReceived(LinkInterface* link, mavlink_message_t mes
break
;
}
// This must be emitted after the vehicle processes the message. This way the vehicle state is up to date when anyone else
// does processing.
emit
mavlinkMessageReceived
(
message
);
_uas
->
receiveMessage
(
message
);
...
...
src/audio/QGCAudioWorkerTest.cc
0 → 100644
View file @
68b05a41
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#include "QGCAudioWorkerTest.h"
#include "QGCAudioWorker.h"
QGCAudioWorkerTest
::
QGCAudioWorkerTest
(
void
)
{
}
void
QGCAudioWorkerTest
::
_testSpokenReplacements
(
void
)
{
QString
result
=
QGCAudioWorker
::
fixTextMessageForAudio
(
QStringLiteral
(
"-10.5m, -10.5m. -10.5 m"
));
QCOMPARE
(
result
,
QStringLiteral
(
" negative 10.5 meters, negative 10.5 meters. negative 10.5 meters"
));
result
=
QGCAudioWorker
::
fixTextMessageForAudio
(
QStringLiteral
(
"-10m -10 m"
));
QCOMPARE
(
result
,
QStringLiteral
(
" negative 10 meters negative 10 meters"
));
result
=
QGCAudioWorker
::
fixTextMessageForAudio
(
QStringLiteral
(
"foo -10m -10 m bar"
));
QCOMPARE
(
result
,
QStringLiteral
(
"foo negative 10 meters negative 10 meters bar"
));
result
=
QGCAudioWorker
::
fixTextMessageForAudio
(
QStringLiteral
(
"-foom"
));
QCOMPARE
(
result
,
QStringLiteral
(
"-foom"
));
result
=
QGCAudioWorker
::
fixTextMessageForAudio
(
QStringLiteral
(
"10 moo"
));
QCOMPARE
(
result
,
QStringLiteral
(
"10 moo"
));
result
=
QGCAudioWorker
::
fixTextMessageForAudio
(
QStringLiteral
(
"10moo"
));
QCOMPARE
(
result
,
QStringLiteral
(
"10moo"
));
}
src/audio/QGCAudioWorkerTest.h
0 → 100644
View file @
68b05a41
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
#pragma once
#include "UnitTest.h"
class
QGCAudioWorkerTest
:
public
UnitTest
{
Q_OBJECT
public:
QGCAudioWorkerTest
(
void
);
private
slots
:
void
_testSpokenReplacements
(
void
);
};
src/qgcunittest/UnitTestList.cc
View file @
68b05a41
...
...
@@ -38,6 +38,7 @@
#include "PlanMasterControllerTest.h"
#include "MissionSettingsTest.h"
#include "QGCMapPolygonTest.h"
#include "QGCAudioWorkerTest.h"
UT_REGISTER_TEST
(
FactSystemTestGeneric
)
UT_REGISTER_TEST
(
FactSystemTestPX4
)
...
...
@@ -63,6 +64,7 @@ UT_REGISTER_TEST(SpeedSectionTest)
UT_REGISTER_TEST
(
PlanMasterControllerTest
)
UT_REGISTER_TEST
(
MissionSettingsTest
)
UT_REGISTER_TEST
(
QGCMapPolygonTest
)
UT_REGISTER_TEST
(
QGCAudioWorkerTest
)
// List of unit test which are currently disabled.
// If disabling a new test, include reason in comment.
...
...
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