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
243d1114
Commit
243d1114
authored
Sep 15, 2011
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing Line chart
parent
86c7e134
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
49 deletions
+51
-49
PxQuadMAV.cc
src/uas/PxQuadMAV.cc
+42
-45
MainWindow.cc
src/ui/MainWindow.cc
+9
-4
No files found.
src/uas/PxQuadMAV.cc
View file @
243d1114
...
@@ -131,51 +131,48 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
...
@@ -131,51 +131,48 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
emit
valueChanged
(
uasId
,
"vis. speed z"
,
"m/s"
,
speed
.
z
,
time
);
emit
valueChanged
(
uasId
,
"vis. speed z"
,
"m/s"
,
speed
.
z
,
time
);
}
}
break
;
break
;
<<<<<<<
HEAD
// case MAVLINK_MSG_ID_CONTROL_STATUS:
=======
// {
case
MAVLINK_MSG_ID_CONTROL_STATUS
:
// mavlink_control_status_t status;
{
// mavlink_msg_control_status_decode(&message, &status);
mavlink_control_status_t
status
;
// // Emit control status vector
mavlink_msg_control_status_decode
(
&
message
,
&
status
);
// emit attitudeControlEnabled(static_cast<bool>(status.control_att));
// Emit control status vector
// emit positionXYControlEnabled(static_cast<bool>(status.control_pos_xy));
emit
attitudeControlEnabled
(
static_cast
<
bool
>
(
status
.
control_att
));
// emit positionZControlEnabled(static_cast<bool>(status.control_pos_z));
emit
positionXYControlEnabled
(
static_cast
<
bool
>
(
status
.
control_pos_xy
));
// emit positionYawControlEnabled(static_cast<bool>(status.control_pos_yaw));
emit
positionZControlEnabled
(
static_cast
<
bool
>
(
status
.
control_pos_z
));
emit
positionYawControlEnabled
(
static_cast
<
bool
>
(
status
.
control_pos_yaw
));
// // Emit localization status vector
// emit localizationChanged(this, status.position_fix);
// Emit localization status vector
// emit visionLocalizationChanged(this, status.vision_fix);
emit
localizationChanged
(
this
,
status
.
position_fix
);
// emit gpsLocalizationChanged(this, status.gps_fix);
emit
visionLocalizationChanged
(
this
,
status
.
vision_fix
);
// }
emit
gpsLocalizationChanged
(
this
,
status
.
gps_fix
);
// break;
}
// case MAVLINK_MSG_ID_VISUAL_ODOMETRY:
break
;
// {
case
MAVLINK_MSG_ID_VISUAL_ODOMETRY
:
// mavlink_visual_odometry_t pos;
{
// mavlink_msg_visual_odometry_decode(&message, &pos);
mavlink_visual_odometry_t
pos
;
// quint64 time = getUnixTime(pos.frame1_time_us);
mavlink_msg_visual_odometry_decode
(
&
message
,
&
pos
);
// //emit valueChanged(uasId, "vis. time", pos.usec, time);
quint64
time
=
getUnixTime
(
pos
.
frame1_time_us
);
// emit valueChanged(uasId, "vis-o. roll", "rad", pos.roll, time);
//emit valueChanged(uasId, "vis. time", pos.usec, time);
// emit valueChanged(uasId, "vis-o. pitch", "rad", pos.pitch, time);
emit
valueChanged
(
uasId
,
"vis-o. roll"
,
"rad"
,
pos
.
roll
,
time
);
// emit valueChanged(uasId, "vis-o. yaw", "rad", pos.yaw, time);
emit
valueChanged
(
uasId
,
"vis-o. pitch"
,
"rad"
,
pos
.
pitch
,
time
);
// emit valueChanged(uasId, "vis-o. x", "m", pos.x, time);
emit
valueChanged
(
uasId
,
"vis-o. yaw"
,
"rad"
,
pos
.
yaw
,
time
);
// emit valueChanged(uasId, "vis-o. y", "m", pos.y, time);
emit
valueChanged
(
uasId
,
"vis-o. x"
,
"m"
,
pos
.
x
,
time
);
// emit valueChanged(uasId, "vis-o. z", "m", pos.z, time);
emit
valueChanged
(
uasId
,
"vis-o. y"
,
"m"
,
pos
.
y
,
time
);
// }
emit
valueChanged
(
uasId
,
"vis-o. z"
,
"m"
,
pos
.
z
,
time
);
// break;
}
// case MAVLINK_MSG_ID_AUX_STATUS: {
break
;
// mavlink_aux_status_t status;
case
MAVLINK_MSG_ID_AUX_STATUS
:
{
// mavlink_msg_aux_status_decode(&message, &status);
mavlink_aux_status_t
status
;
// emit loadChanged(this, status.load/10.0f);
mavlink_msg_aux_status_decode
(
&
message
,
&
status
);
// emit errCountChanged(uasId, "IMU", "I2C0", status.i2c0_err_count);
emit
loadChanged
(
this
,
status
.
load
/
10.0
f
);
// emit errCountChanged(uasId, "IMU", "I2C1", status.i2c1_err_count);
emit
errCountChanged
(
uasId
,
"IMU"
,
"I2C0"
,
status
.
i2c0_err_count
);
// emit errCountChanged(uasId, "IMU", "SPI0", status.spi0_err_count);
emit
errCountChanged
(
uasId
,
"IMU"
,
"I2C1"
,
status
.
i2c1_err_count
);
// emit errCountChanged(uasId, "IMU", "SPI1", status.spi1_err_count);
emit
errCountChanged
(
uasId
,
"IMU"
,
"SPI0"
,
status
.
spi0_err_count
);
// emit errCountChanged(uasId, "IMU", "UART", status.uart_total_err_count);
emit
errCountChanged
(
uasId
,
"IMU"
,
"SPI1"
,
status
.
spi1_err_count
);
// emit valueChanged(uasId, "Load", "%", ((float)status.load)/10.0f, getUnixTime());
emit
errCountChanged
(
uasId
,
"IMU"
,
"UART"
,
status
.
uart_total_err_count
);
// }
emit
valueChanged
(
uasId
,
"Load"
,
"%"
,
((
float
)
status
.
load
)
/
10.0
f
,
getUnixTime
());
// break;
}
break
;
>>>>>>>
master
default:
default:
// Let UAS handle the default message set
// Let UAS handle the default message set
UAS
::
receiveMessage
(
link
,
message
);
UAS
::
receiveMessage
(
link
,
message
);
...
...
src/ui/MainWindow.cc
View file @
243d1114
...
@@ -49,6 +49,7 @@ This file is part of the QGROUNDCONTROL project
...
@@ -49,6 +49,7 @@ This file is part of the QGROUNDCONTROL project
#include "QGCMAVLinkLogPlayer.h"
#include "QGCMAVLinkLogPlayer.h"
#include "QGCSettingsWidget.h"
#include "QGCSettingsWidget.h"
#include "QGCMapTool.h"
#include "QGCMapTool.h"
#include "MAVLinkDecoder.h"
#ifdef QGC_OSG_ENABLED
#ifdef QGC_OSG_ENABLED
#include "Q3DWidgetFactory.h"
#include "Q3DWidgetFactory.h"
...
@@ -165,9 +166,6 @@ MainWindow::MainWindow(QWidget *parent):
...
@@ -165,9 +166,6 @@ MainWindow::MainWindow(QWidget *parent):
connect
(
LinkManager
::
instance
(),
SIGNAL
(
newLink
(
LinkInterface
*
)),
this
,
SLOT
(
addLink
(
LinkInterface
*
)));
connect
(
LinkManager
::
instance
(),
SIGNAL
(
newLink
(
LinkInterface
*
)),
this
,
SLOT
(
addLink
(
LinkInterface
*
)));
// Add generic MAVLink decoder
mavlinkDecoder
=
new
MAVLinkDecoder
(
mavlink
,
this
);
// Connect user interface devices
// Connect user interface devices
joystickWidget
=
0
;
joystickWidget
=
0
;
joystick
=
new
JoystickInput
();
joystick
=
new
JoystickInput
();
...
@@ -299,6 +297,8 @@ void MainWindow::buildCommonWidgets()
...
@@ -299,6 +297,8 @@ void MainWindow::buildCommonWidgets()
//TODO: move protocol outside UI
//TODO: move protocol outside UI
mavlink
=
new
MAVLinkProtocol
();
mavlink
=
new
MAVLinkProtocol
();
connect
(
mavlink
,
SIGNAL
(
protocolStatusMessage
(
QString
,
QString
)),
this
,
SLOT
(
showCriticalMessage
(
QString
,
QString
)),
Qt
::
QueuedConnection
);
connect
(
mavlink
,
SIGNAL
(
protocolStatusMessage
(
QString
,
QString
)),
this
,
SLOT
(
showCriticalMessage
(
QString
,
QString
)),
Qt
::
QueuedConnection
);
// Add generic MAVLink decoder
mavlinkDecoder
=
new
MAVLinkDecoder
(
mavlink
,
this
);
// Dock widgets
// Dock widgets
if
(
!
controlDockWidget
)
if
(
!
controlDockWidget
)
...
@@ -338,6 +338,10 @@ void MainWindow::buildCommonWidgets()
...
@@ -338,6 +338,10 @@ void MainWindow::buildCommonWidgets()
debugConsoleDockWidget
=
new
QDockWidget
(
tr
(
"Communication Console"
),
this
);
debugConsoleDockWidget
=
new
QDockWidget
(
tr
(
"Communication Console"
),
this
);
debugConsoleDockWidget
->
setWidget
(
new
DebugConsole
(
this
)
);
debugConsoleDockWidget
->
setWidget
(
new
DebugConsole
(
this
)
);
debugConsoleDockWidget
->
setObjectName
(
"COMMUNICATION_DEBUG_CONSOLE_DOCKWIDGET"
);
debugConsoleDockWidget
->
setObjectName
(
"COMMUNICATION_DEBUG_CONSOLE_DOCKWIDGET"
);
DebugConsole
*
debugConsole
=
dynamic_cast
<
DebugConsole
*>
(
debugConsoleDockWidget
->
widget
());
connect
(
mavlinkDecoder
,
SIGNAL
(
textMessageReceived
(
int
,
int
,
int
,
const
QString
)),
debugConsole
,
SLOT
(
receiveTextMessage
(
int
,
int
,
int
,
const
QString
)));
addTool
(
debugConsoleDockWidget
,
tr
(
"Communication Console"
),
Qt
::
BottomDockWidgetArea
);
addTool
(
debugConsoleDockWidget
,
tr
(
"Communication Console"
),
Qt
::
BottomDockWidgetArea
);
}
}
...
@@ -1103,7 +1107,8 @@ void MainWindow::UASCreated(UASInterface* uas)
...
@@ -1103,7 +1107,8 @@ void MainWindow::UASCreated(UASInterface* uas)
if
(
!
linechartWidget
)
if
(
!
linechartWidget
)
{
{
// Center widgets
// Center widgets
linechartWidget
=
new
Linecharts
(
this
);
linechartWidget
=
new
Linecharts
(
this
);
//linechartWidget FIXME
addCentralWidget
(
linechartWidget
,
tr
(
"Realtime Plot"
));
addCentralWidget
(
linechartWidget
,
tr
(
"Realtime Plot"
));
}
}
...
...
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