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
585cc5b3
Commit
585cc5b3
authored
Oct 10, 2011
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up debug vects, fixed a few bugs in radio control widget
parent
381b3ed7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
+21
-10
UAS.cc
src/uas/UAS.cc
+2
-0
MAVLinkDecoder.cc
src/ui/MAVLinkDecoder.cc
+2
-0
QGCRemoteControlView.cc
src/ui/QGCRemoteControlView.cc
+17
-10
No files found.
src/uas/UAS.cc
View file @
585cc5b3
...
...
@@ -890,10 +890,12 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
case
MAVLINK_MSG_ID_SCALED_PRESSURE
:
case
MAVLINK_MSG_ID_SERVO_OUTPUT_RAW
:
case
MAVLINK_MSG_ID_OPTICAL_FLOW
:
break
;
case
MAVLINK_MSG_ID_DEBUG_VECT
:
{
mavlink_debug_vect_t
debug
;
mavlink_msg_debug_vect_decode
(
&
message
,
&
debug
);
debug
.
name
[
MAVLINK_MSG_DEBUG_VECT_FIELD_NAME_LEN
-
1
]
=
'\0'
;
QString
name
(
debug
.
name
);
quint64
time
=
getUnixTime
(
debug
.
time_usec
);
emit
valueChanged
(
uasId
,
name
+
".x"
,
"raw"
,
debug
.
x
,
time
);
...
...
src/ui/MAVLinkDecoder.cc
View file @
585cc5b3
...
...
@@ -20,6 +20,8 @@ MAVLinkDecoder::MAVLinkDecoder(MAVLinkProtocol* protocol, QObject *parent) :
messageFilter
.
insert
(
MAVLINK_MSG_ID_MISSION_ITEM
,
false
);
messageFilter
.
insert
(
MAVLINK_MSG_ID_MISSION_COUNT
,
false
);
messageFilter
.
insert
(
MAVLINK_MSG_ID_MISSION_ACK
,
false
);
messageFilter
.
insert
(
MAVLINK_MSG_ID_NAMED_VALUE_FLOAT
,
false
);
messageFilter
.
insert
(
MAVLINK_MSG_ID_NAMED_VALUE_INT
,
false
);
textMessageFilter
.
insert
(
MAVLINK_MSG_ID_DEBUG
,
false
);
textMessageFilter
.
insert
(
MAVLINK_MSG_ID_DEBUG_VECT
,
false
);
...
...
src/ui/QGCRemoteControlView.cc
View file @
585cc5b3
...
...
@@ -77,21 +77,26 @@ QGCRemoteControlView::~QGCRemoteControlView()
void
QGCRemoteControlView
::
setUASId
(
int
id
)
{
// Clear channel count
raw
.
clear
();
normalized
.
clear
();
if
(
uasId
!=
-
1
)
{
UASInterface
*
uas
=
UASManager
::
instance
()
->
getUASForId
(
id
);
if
(
uas
)
{
if
(
uasId
!=
-
1
)
{
UASInterface
*
uas
=
UASManager
::
instance
()
->
getUASForId
(
uasId
);
if
(
uas
)
{
// The UAS exists, disconnect any existing connections
disconnect
(
uas
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
,
float
)),
this
,
SLOT
(
setChannel
(
int
,
float
,
float
)));
disconnect
(
uas
,
SIGNAL
(
remoteControlRSSIChanged
(
float
)),
this
,
SLOT
(
setRemoteRSSI
(
float
)));
disconnect
(
uas
,
SIGNAL
(
radioCalibrationRawReceived
(
const
QPointer
<
RadioCalibrationData
>&
)),
calibrationWindow
,
SLOT
(
receive
(
const
QPointer
<
RadioCalibrationData
>&
)));
disconnect
(
uas
,
SIGNAL
(
remoteControlChannelRawChanged
(
int
,
float
)),
calibrationWindow
,
SLOT
(
setChannel
(
int
,
float
)));
disconnect
(
uas
,
SIGNAL
(
remoteControlChannelScaledChanged
(
int
,
float
)),
this
,
SLOT
(
setChannelScaled
(
int
,
float
)));
}
}
// Clear channel count
raw
.
clear
();
raw
.
resize
(
0
);
normalized
.
clear
();
normalized
.
resize
(
0
);
foreach
(
QLabel
*
label
,
rawLabels
)
{
label
->
deleteLater
();
...
...
@@ -103,11 +108,14 @@ void QGCRemoteControlView::setUASId(int id)
}
rawLabels
.
clear
();
rawLabels
.
resize
(
0
);
progressBars
.
clear
();
progressBars
.
resize
(
0
);
// Connect the new UAS
UASInterface
*
newUAS
=
UASManager
::
instance
()
->
getUASForId
(
id
);
if
(
newUAS
)
{
if
(
newUAS
)
{
// New UAS exists, connect
nameLabel
->
setText
(
QString
(
"RC Input of %1"
).
arg
(
newUAS
->
getUASName
()));
calibrationWindow
->
setUASId
(
id
);
...
...
@@ -140,11 +148,10 @@ void QGCRemoteControlView::setChannelRaw(int channelId, float raw)
void
QGCRemoteControlView
::
setChannelScaled
(
int
channelId
,
float
normalized
)
{
if
(
this
->
raw
.
size
()
<=
channelId
)
// using raw vector as size indicator
if
(
this
->
normalized
.
size
()
<=
channelId
)
// using raw vector as size indicator
{
// This is a new channel, append it
this
->
normalized
.
append
(
normalized
);
this
->
raw
.
append
(
0
);
appendChannelWidget
(
channelId
);
updated
=
true
;
}
...
...
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