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
82a340f7
Commit
82a340f7
authored
May 30, 2018
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code
parent
161096d0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
117 deletions
+4
-117
Vehicle.cc
src/Vehicle/Vehicle.cc
+0
-13
Vehicle.h
src/Vehicle/Vehicle.h
+0
-2
QGCXPlaneLink.cc
src/comm/QGCXPlaneLink.cc
+1
-1
UAS.cc
src/uas/UAS.cc
+0
-5
UAS.h
src/uas/UAS.h
+3
-43
UASInterface.h
src/uas/UASInterface.h
+0
-53
No files found.
src/Vehicle/Vehicle.cc
View file @
82a340f7
...
...
@@ -1838,19 +1838,6 @@ bool Vehicle::xConfigMotors(void)
return
_firmwarePlugin
->
multiRotorXConfig
(
this
);
}
/*
* Internal
*/
QString
Vehicle
::
getMavIconColor
()
{
// TODO: Not using because not only the colors are ghastly, it doesn't respect dark/light palette
if
(
_mav
)
return
_mav
->
getColor
().
name
();
else
return
QString
(
"black"
);
}
QString
Vehicle
::
formatedMessages
()
{
QString
messages
;
...
...
src/Vehicle/Vehicle.h
View file @
82a340f7
...
...
@@ -556,8 +556,6 @@ public:
/// @return -1: reserver all buttons, >0 number of buttons to reserve
Q_PROPERTY
(
int
manualControlReservedButtonCount
READ
manualControlReservedButtonCount
CONSTANT
)
Q_INVOKABLE
QString
getMavIconColor
();
// Called when the message drop-down is invoked to clear current count
Q_INVOKABLE
void
resetMessages
();
...
...
src/comm/QGCXPlaneLink.cc
View file @
82a340f7
...
...
@@ -1064,7 +1064,7 @@ void QGCXPlaneLink::setRandomPosition()
_vehicle
->
altitudeAMSL
()
->
rawValue
().
toDouble
()
+
offAlt
,
_vehicle
->
roll
()
->
rawValue
().
toDouble
(),
_vehicle
->
pitch
()
->
rawValue
().
toDouble
(),
_vehicle
->
uas
()
->
getYaw
());
_vehicle
->
heading
()
->
rawValue
().
toDouble
());
}
void
QGCXPlaneLink
::
setRandomAttitude
()
...
...
src/uas/UAS.cc
View file @
82a340f7
...
...
@@ -73,10 +73,6 @@ UAS::UAS(MAVLinkProtocol* protocol, Vehicle* vehicle, FirmwarePluginManager * fi
attitudeStamped
(
false
),
lastAttitude
(
0
),
roll
(
0.0
),
pitch
(
0.0
),
yaw
(
0.0
),
imagePackets
(
0
),
// We must initialize to 0, otherwise extended data packets maybe incorrectly thought to be images
blockHomePositionChanges
(
false
),
...
...
@@ -133,7 +129,6 @@ UAS::UAS(MAVLinkProtocol* protocol, Vehicle* vehicle, FirmwarePluginManager * fi
#ifndef __mobile__
connect
(
_vehicle
,
&
Vehicle
::
mavlinkMessageReceived
,
&
fileManager
,
&
FileManager
::
receiveMessage
);
color
=
UASInterface
::
getNextColor
();
#endif
}
...
...
src/uas/UAS.h
View file @
82a340f7
...
...
@@ -60,46 +60,9 @@ public:
/** @brief The time interval the robot is switched on */
quint64
getUptime
()
const
;
Q_PROPERTY
(
double
roll
READ
getRoll
WRITE
setRoll
NOTIFY
rollChanged
)
Q_PROPERTY
(
double
pitch
READ
getPitch
WRITE
setPitch
NOTIFY
pitchChanged
)
Q_PROPERTY
(
double
yaw
READ
getYaw
WRITE
setYaw
NOTIFY
yawChanged
)
/// Vehicle is about to go away
void
shutdownVehicle
(
void
);
void
setRoll
(
double
val
)
{
roll
=
val
;
emit
rollChanged
(
val
,
"roll"
);
}
double
getRoll
()
const
{
return
roll
;
}
void
setPitch
(
double
val
)
{
pitch
=
val
;
emit
pitchChanged
(
val
,
"pitch"
);
}
double
getPitch
()
const
{
return
pitch
;
}
void
setYaw
(
double
val
)
{
yaw
=
val
;
emit
yawChanged
(
val
,
"yaw"
);
}
double
getYaw
()
const
{
return
yaw
;
}
/// Vehicle is about to go away
void
shutdownVehicle
(
void
);
// Setters for HIL noise variance
void
setXaccVar
(
float
var
){
xacc_var
=
var
;
...
...
@@ -196,9 +159,6 @@ protected: //COMMENTS FOR TEST UNIT
bool
attitudeKnown
;
///< True if attitude was received, false else
bool
attitudeStamped
;
///< Should arriving data be timestamped with the last attitude? This helps with broken system time clocks on the MAV
quint64
lastAttitude
;
///< Timestamp of last attitude measurement
double
roll
;
double
pitch
;
double
yaw
;
// dongfang: This looks like a candidate for being moved off to a separate class.
/// IMAGING
...
...
src/uas/UASInterface.h
View file @
82a340f7
...
...
@@ -45,62 +45,12 @@ public:
/** @brief The time interval the robot is switched on **/
virtual
quint64
getUptime
()
const
=
0
;
virtual
double
getRoll
()
const
=
0
;
virtual
double
getPitch
()
const
=
0
;
virtual
double
getYaw
()
const
=
0
;
#ifndef __mobile__
virtual
FileManager
*
getFileManager
()
=
0
;
#endif
/**
* @brief Get the color for this UAS
*
* This static function holds a color map that allows to draw a new color for each robot
*
* @return The next color in the color map. The map holds 20 colors and starts from the beginning
* if the colors are exceeded.
*/
#if !defined(__mobile__)
static
QColor
getNextColor
()
{
/* Create color map */
static
QList
<
QColor
>
colors
=
QList
<
QColor
>
()
<<
QColor
(
231
,
72
,
28
)
<<
QColor
(
104
,
64
,
240
)
<<
QColor
(
203
,
254
,
121
)
<<
QColor
(
161
,
252
,
116
)
<<
QColor
(
232
,
33
,
47
)
<<
QColor
(
116
,
251
,
110
)
<<
QColor
(
234
,
38
,
107
)
<<
QColor
(
104
,
250
,
138
)
<<
QColor
(
235
,
43
,
165
)
<<
QColor
(
98
,
248
,
176
)
<<
QColor
(
236
,
48
,
221
)
<<
QColor
(
92
,
247
,
217
)
<<
QColor
(
200
,
54
,
238
)
<<
QColor
(
87
,
231
,
246
)
<<
QColor
(
151
,
59
,
239
)
<<
QColor
(
81
,
183
,
244
)
<<
QColor
(
75
,
133
,
243
)
<<
QColor
(
242
,
255
,
128
)
<<
QColor
(
230
,
126
,
23
);
static
int
nextColor
=
-
1
;
if
(
nextColor
==
18
){
//if at the end of the list
nextColor
=
-
1
;
//go back to the beginning
}
nextColor
++
;
return
colors
[
nextColor
];
//return the next color
}
#endif
virtual
QMap
<
int
,
QString
>
getComponents
()
=
0
;
QColor
getColor
()
{
return
color
;
}
enum
StartCalibrationType
{
StartCalibrationRadio
,
StartCalibrationGyro
,
...
...
@@ -160,9 +110,6 @@ public slots:
/** @brief Send command to disable all bindings/maps between RC and parameters */
virtual
void
unsetRCToParameterMap
()
=
0
;
protected:
QColor
color
;
signals:
/** @brief A text message from the system has been received */
void
textMessageReceived
(
int
uasid
,
int
componentid
,
int
severity
,
QString
text
);
...
...
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