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
6d994de4
Commit
6d994de4
authored
Nov 17, 2010
by
Mariano Lizarraga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trying to find memory leak bug
parent
e441869a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
36 deletions
+16
-36
SlugsMAV.cc
src/uas/SlugsMAV.cc
+3
-3
UAS.cc
src/uas/UAS.cc
+0
-5
SlugsPIDControl.cpp
src/ui/SlugsPIDControl.cpp
+11
-7
slugshilsim.cc
src/ui/slugshilsim.cc
+2
-20
slugshilsim.h
src/ui/slugshilsim.h
+0
-1
No files found.
src/uas/SlugsMAV.cc
View file @
6d994de4
...
...
@@ -26,7 +26,7 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
case
MAVLINK_MSG_ID_HEARTBEAT
:
{
qDebug
()
<<
"SLUGS RECEIVED HEARTBEAT"
;
//
qDebug() << "SLUGS RECEIVED HEARTBEAT";
break
;
}
...
...
@@ -299,7 +299,7 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
}
case
MAVLINK_MSG_ID_ACTION_ACK
:
{
qDebug
()
<<
"---
----->>>>>>>>>>>
>>>> EMITIENDO MAVLINK_MSG_ID_ACTION_ACK"
;
qDebug
()
<<
"--->>>> EMITIENDO MAVLINK_MSG_ID_ACTION_ACK"
;
mavlink_action_ack_t
ack
;
mavlink_msg_action_ack_decode
(
&
message
,
&
ack
);
...
...
@@ -348,7 +348,7 @@ void SlugsMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
#endif
default:
qDebug
()
<<
"
\n
SLUGS RECEIVED MESSAGE WITH ID"
<<
message
.
msgid
;
//
qDebug() << "\nSLUGS RECEIVED MESSAGE WITH ID" << message.msgid;
break
;
}
}
src/uas/UAS.cc
View file @
6d994de4
...
...
@@ -611,11 +611,6 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
throttle
<<
radioMsg
.
throttle
[
i
];
QPointer
<
RadioCalibrationData
>
radioData
=
new
RadioCalibrationData
(
aileron
,
elevator
,
rudder
,
gyro
,
pitch
,
throttle
);
emit
radioCalibrationReceived
(
radioData
);
delete
radioData
;
}
...
...
src/ui/SlugsPIDControl.cpp
View file @
6d994de4
...
...
@@ -44,6 +44,7 @@ void SlugsPIDControl::activeUasSet(UASInterface* uas)
{
SlugsMAV
*
slugsMav
=
dynamic_cast
<
SlugsMAV
*>
(
uas
);
if
(
slugsMav
!=
NULL
)
{
connect
(
slugsMav
,
SIGNAL
(
slugsActionAck
(
int
,
uint8_t
,
uint8_t
)),
this
,
SLOT
(
recibeMensaje
(
int
,
uint8_t
,
uint8_t
)));
...
...
@@ -154,23 +155,26 @@ void SlugsPIDControl::changeColor_RED_AirSpeed_groupBox(QString text)
void
SlugsPIDControl
::
changeColor_GREEN_AirSpeed_groupBox
()
{
//create the packet
SlugsMAV
*
slugsMav
=
dynamic_cast
<
SlugsMAV
*>
(
activeUAS
);
if
(
slugsMav
!=
NULL
)
{
//create the packet
pidMessage
.
target
=
activeUAS
->
getUASID
();
pidMessage
.
idx
=
0
;
pidMessage
.
pVal
=
ui
->
dT_P_set
->
text
().
toFloat
();
pidMessage
.
iVal
=
ui
->
dT_I_set
->
text
().
toFloat
();
pidMessage
.
dVal
=
ui
->
dT_D_set
->
text
().
toFloat
();
UAS
*
uas
=
dynamic_cast
<
UAS
*>
(
UASManager
::
instance
()
->
getActiveUAS
());
mavlink_message_t
msg
;
mavlink_msg_pid_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
pidMessage
);
uas
->
sendMessage
(
msg
);
slugsMav
->
sendMessage
(
msg
);
ui
->
AirSpeedHold_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
ui
->
AirSpeedHold_groupBox
->
setStyleSheet
(
GREENcolorStyle
);
}
}
...
...
src/ui/slugshilsim.cc
View file @
6d994de4
...
...
@@ -57,19 +57,6 @@ SlugsHilSim::~SlugsHilSim()
delete
ui
;
}
void
SlugsHilSim
::
linkAdded
(
void
){
// ui->cb_mavlinkLinks->clear();
// QList<LinkInterface *> linkList;
// linkList.append(LinkManager::instance()->getLinks()) ;
// for (int i = 0; i< linkList.size(); i++){
// ui->cb_mavlinkLinks->addItem((linkList.takeFirst())->getName());
// }
}
void
SlugsHilSim
::
addToCombo
(
LinkInterface
*
theLink
){
ui
->
cb_mavlinkLinks
->
addItem
(
theLink
->
getName
());
...
...
@@ -177,12 +164,12 @@ void SlugsHilSim::processHilDatagram(const QByteArray* datagram){
tmpGpsTime
.
visSat
=
datagram
->
at
(
i
++
);
mavlink_msg_gps_date_time_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
tmpGpsTime
);
activeUas
->
sendMessage
(
hilLink
,
&
msg
);
activeUas
->
sendMessage
(
hilLink
,
msg
);
memset
(
&
msg
,
0
,
sizeof
(
mavlink_message_t
));
mavlink_msg_gps_raw_encode
(
MG
::
SYSTEM
::
ID
,
MG
::
SYSTEM
::
COMPID
,
&
msg
,
&
tmpGpsRaw
);
activeUas
->
sendMessage
(
hilLink
,
&
msg
);
activeUas
->
sendMessage
(
hilLink
,
msg
);
// TODO: this is legacy of old HIL datagram. Need to remove from Simulink model
i
++
;
...
...
@@ -200,11 +187,6 @@ float SlugsHilSim::getFloatFromDatagram (const QByteArray* datagram, unsigned ch
tmpF2C
.
chData
[
2
]
=
datagram
->
at
((
*
i
)
++
);
tmpF2C
.
chData
[
3
]
=
datagram
->
at
((
*
i
)
++
);
// if (uas != NULL) {
// //activeUas = uas;
// }
return
tmpF2C
.
flData
;
}
...
...
src/ui/slugshilsim.h
View file @
6d994de4
...
...
@@ -60,7 +60,6 @@ protected:
UAS
*
activeUas
;
public
slots
:
void
linkAdded
(
void
);
/**
* @brief Adds a link to the combo box listing so the user can select a link
...
...
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