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
6187d71c
Commit
6187d71c
authored
Jan 11, 2012
by
pixhawk
Browse files
Options
Browse Files
Download
Plain Diff
Merged with v10release. Some more GUI improvements.
parents
e89983da
25e35803
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
153 additions
and
37 deletions
+153
-37
Doxyfile
doc/Doxyfile
+6
-5
QGC.cc
src/QGC.cc
+1
-1
QGC.h
src/QGC.h
+1
-1
MAVLinkSimulationMAV.cc
src/comm/MAVLinkSimulationMAV.cc
+4
-4
JoystickInput.cc
src/input/JoystickInput.cc
+26
-5
JoystickInput.h
src/input/JoystickInput.h
+3
-0
utils_external.pri
src/libs/utils/utils_external.pri
+1
-1
UAS.cc
src/uas/UAS.cc
+6
-7
UAS.h
src/uas/UAS.h
+2
-0
UASWaypointManager.cc
src/uas/UASWaypointManager.cc
+4
-0
HSIDisplay.cc
src/ui/HSIDisplay.cc
+5
-0
QGCMAVLinkInspector.cc
src/ui/QGCMAVLinkInspector.cc
+3
-0
QGCMAVLinkInspector.h
src/ui/QGCMAVLinkInspector.h
+2
-2
QGCRGBDView.cc
src/ui/QGCRGBDView.cc
+2
-0
WaypointEditableView.cc
src/ui/WaypointEditableView.cc
+1
-3
WaypointEditableView.ui
src/ui/WaypointEditableView.ui
+43
-1
WaypointViewOnlyView.ui
src/ui/WaypointViewOnlyView.ui
+29
-2
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+1
-1
UASControlWidget.cc
src/ui/uas/UASControlWidget.cc
+12
-4
UASListWidget.cc
src/ui/uas/UASListWidget.cc
+1
-0
No files found.
doc/Doxyfile
View file @
6187d71c
...
@@ -515,7 +515,7 @@ LAYOUT_FILE =
...
@@ -515,7 +515,7 @@ LAYOUT_FILE =
# The QUIET tag can be used to turn on/off the messages that are generated
# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
# by doxygen. Possible values are YES and NO. If left blank NO is used.
QUIET =
YES
QUIET =
NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated by doxygen. Possible values are YES and NO. If left blank
# generated by doxygen. Possible values are YES and NO. If left blank
...
@@ -599,7 +599,8 @@ RECURSIVE = YES
...
@@ -599,7 +599,8 @@ RECURSIVE = YES
# subdirectory from a directory tree whose root is specified with the INPUT tag.
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = ../src/lib/ \
EXCLUDE = ../src/lib/ \
lib/
lib/ \
../src/libs/
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
# directories that are symbolic links (a Unix filesystem feature) are excluded
...
@@ -985,7 +986,7 @@ SEARCHENGINE = YES
...
@@ -985,7 +986,7 @@ SEARCHENGINE = YES
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
# generate Latex output.
GENERATE_LATEX =
YES
GENERATE_LATEX =
NO
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
...
@@ -1033,13 +1034,13 @@ LATEX_HEADER =
...
@@ -1033,13 +1034,13 @@ LATEX_HEADER =
# contain links (just like the HTML output) instead of page references
# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
# This makes the output suitable for online browsing using a pdf viewer.
PDF_HYPERLINKS =
YES
PDF_HYPERLINKS =
NO
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
# plain latex in the generated Makefile. Set this option to YES to get a
# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.
# higher quality PDF documentation.
USE_PDFLATEX =
YES
USE_PDFLATEX =
NO
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
# command to the generated LaTeX files. This will instruct LaTeX to keep
# command to the generated LaTeX files. This will instruct LaTeX to keep
...
...
src/QGC.cc
View file @
6187d71c
...
@@ -64,7 +64,7 @@ float limitAngleToPMPIf(float angle)
...
@@ -64,7 +64,7 @@ float limitAngleToPMPIf(float angle)
else
else
{
{
// Approximate
// Approximate
angle
=
fmodf
(
angle
,
M_PI
);
angle
=
fmodf
(
angle
,
(
float
)
M_PI
);
}
}
return
angle
;
return
angle
;
...
...
src/QGC.h
View file @
6187d71c
...
@@ -47,7 +47,7 @@ inline bool isnan(T value)
...
@@ -47,7 +47,7 @@ inline bool isnan(T value)
template
<
typename
T
>
template
<
typename
T
>
inline
bool
isinf
(
T
value
)
inline
bool
isinf
(
T
value
)
{
{
return
std
::
numeric_limits
<
T
>::
has_infinity
&&
(
value
==
std
::
numeric_limits
<
T
>::
infinity
()
||
(
-
1
*
value
)
==
std
::
numeric_limits
<
T
>::
infinity
())
;
return
(
value
==
std
::
numeric_limits
<
T
>::
infinity
()
||
(
-
1
*
value
)
==
std
::
numeric_limits
<
T
>::
infinity
())
&&
std
::
numeric_limits
<
T
>::
has_infinity
;
}
}
#else
#else
#include <cmath>
#include <cmath>
...
...
src/comm/MAVLinkSimulationMAV.cc
View file @
6187d71c
...
@@ -221,10 +221,10 @@ void MAVLinkSimulationMAV::mainloop()
...
@@ -221,10 +221,10 @@ void MAVLinkSimulationMAV::mainloop()
if
(
sys_mode
&
MAV_MODE_FLAG_DECODE_POSITION_HIL
)
if
(
sys_mode
&
MAV_MODE_FLAG_DECODE_POSITION_HIL
)
{
{
mavlink_hil_controls_t
hil
;
mavlink_hil_controls_t
hil
;
hil
.
roll_ailerons
=
0.0
;
hil
.
roll_ailerons
=
0.0
f
;
hil
.
pitch_elevator
=
0.05
;
hil
.
pitch_elevator
=
0.05
f
;
hil
.
yaw_rudder
=
0.05
;
hil
.
yaw_rudder
=
0.05
f
;
hil
.
throttle
=
0.6
;
hil
.
throttle
=
0.6
f
;
// Encode the data (adding header and checksums, etc.)
// Encode the data (adding header and checksums, etc.)
mavlink_msg_hil_controls_encode
(
systemid
,
MAV_COMP_ID_IMU
,
&
ret
,
&
hil
);
mavlink_msg_hil_controls_encode
(
systemid
,
MAV_COMP_ID_IMU
,
&
ret
,
&
hil
);
// And send it
// And send it
...
...
src/input/JoystickInput.cc
View file @
6187d71c
...
@@ -37,6 +37,7 @@ This file is part of the PIXHAWK project
...
@@ -37,6 +37,7 @@ This file is part of the PIXHAWK project
#include "UAS.h"
#include "UAS.h"
#include "UASManager.h"
#include "UASManager.h"
#include "QGC.h"
#include "QGC.h"
#include <QMutexLocker>
/**
/**
* The coordinate frame of the joystick axis is the aeronautical frame like shown on this image:
* The coordinate frame of the joystick axis is the aeronautical frame like shown on this image:
...
@@ -49,10 +50,10 @@ JoystickInput::JoystickInput() :
...
@@ -49,10 +50,10 @@ JoystickInput::JoystickInput() :
uas
(
NULL
),
uas
(
NULL
),
uasButtonList
(
QList
<
int
>
()),
uasButtonList
(
QList
<
int
>
()),
done
(
false
),
done
(
false
),
thrustAxis
(
3
),
thrustAxis
(
2
),
xAxis
(
1
),
xAxis
(
0
),
yAxis
(
0
),
yAxis
(
1
),
yawAxis
(
2
),
yawAxis
(
3
),
joystickName
(
tr
(
"Unitinialized"
))
joystickName
(
tr
(
"Unitinialized"
))
{
{
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
...
@@ -66,6 +67,17 @@ JoystickInput::JoystickInput() :
...
@@ -66,6 +67,17 @@ JoystickInput::JoystickInput() :
//start();
//start();
}
}
JoystickInput
::~
JoystickInput
()
{
{
QMutexLocker
locker
(
&
this
->
m_doneMutex
);
done
=
true
;
}
this
->
wait
();
this
->
deleteLater
();
}
void
JoystickInput
::
setActiveUAS
(
UASInterface
*
uas
)
void
JoystickInput
::
setActiveUAS
(
UASInterface
*
uas
)
{
{
// Only connect / disconnect is the UAS is of a controllable UAS class
// Only connect / disconnect is the UAS is of a controllable UAS class
...
@@ -134,7 +146,16 @@ void JoystickInput::run()
...
@@ -134,7 +146,16 @@ void JoystickInput::run()
init
();
init
();
while
(
!
done
)
{
forever
{
{
QMutexLocker
locker
(
&
this
->
m_doneMutex
);
if
(
done
)
{
done
=
false
;
break
;
}
}
while
(
SDL_PollEvent
(
&
event
))
{
while
(
SDL_PollEvent
(
&
event
))
{
SDL_JoystickUpdate
();
SDL_JoystickUpdate
();
...
...
src/input/JoystickInput.h
View file @
6187d71c
...
@@ -35,6 +35,7 @@ This file is part of the PIXHAWK project
...
@@ -35,6 +35,7 @@ This file is part of the PIXHAWK project
#include <QThread>
#include <QThread>
#include <QList>
#include <QList>
#include <qmutex.h>
#include <SDL/SDL.h>
#include <SDL/SDL.h>
#include "UASInterface.h"
#include "UASInterface.h"
...
@@ -48,6 +49,7 @@ class JoystickInput : public QThread
...
@@ -48,6 +49,7 @@ class JoystickInput : public QThread
public:
public:
JoystickInput
();
JoystickInput
();
~
JoystickInput
();
void
run
();
void
run
();
const
QString
&
getName
();
const
QString
&
getName
();
...
@@ -63,6 +65,7 @@ protected:
...
@@ -63,6 +65,7 @@ protected:
UASInterface
*
uas
;
UASInterface
*
uas
;
QList
<
int
>
uasButtonList
;
QList
<
int
>
uasButtonList
;
bool
done
;
bool
done
;
QMutex
m_doneMutex
;
// Axis 3 is thrust (CALIBRATION!)
// Axis 3 is thrust (CALIBRATION!)
int
thrustAxis
;
int
thrustAxis
;
...
...
src/libs/utils/utils_external.pri
View file @
6187d71c
...
@@ -77,7 +77,7 @@ macx {
...
@@ -77,7 +77,7 @@ macx {
SOURCES += consoleprocess_unix.cpp
SOURCES += consoleprocess_unix.cpp
}
}
linux-g++ {
linux-g++
|linux-g++-64
{
SOURCES += consoleprocess_unix.cpp
SOURCES += consoleprocess_unix.cpp
}
}
...
...
src/uas/UAS.cc
View file @
6187d71c
...
@@ -767,6 +767,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
...
@@ -767,6 +767,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
imagePayload
=
p
.
payload
;
imagePayload
=
p
.
payload
;
imageQuality
=
p
.
jpg_quality
;
imageQuality
=
p
.
jpg_quality
;
imageType
=
p
.
type
;
imageType
=
p
.
type
;
imageWidth
=
p
.
width
;
imageHeight
=
p
.
height
;
imageStart
=
QGC
::
groundTimeMilliseconds
();
imageStart
=
QGC
::
groundTimeMilliseconds
();
}
}
break
;
break
;
...
@@ -1392,16 +1394,13 @@ QImage UAS::getImage()
...
@@ -1392,16 +1394,13 @@ QImage UAS::getImage()
// RAW greyscale
// RAW greyscale
if
(
imageType
==
MAVLINK_DATA_STREAM_IMG_RAW8U
)
if
(
imageType
==
MAVLINK_DATA_STREAM_IMG_RAW8U
)
{
{
// TODO FIXME Fabian
// TODO FIXME
// RAW hardcoded to 22x22
int
imgColors
=
255
;
//imageSize/(imageWidth*imageHeight);
int
imgWidth
=
22
;
int
imgHeight
=
22
;
int
imgColors
=
255
;
//const int headerSize = 15;
//const int headerSize = 15;
// Construct PGM header
// Construct PGM header
QString
header
(
"P5
\n
%1 %2
\n
%3
\n
"
);
QString
header
(
"P5
\n
%1 %2
\n
%3
\n
"
);
header
=
header
.
arg
(
im
gWidth
).
arg
(
img
Height
).
arg
(
imgColors
);
header
=
header
.
arg
(
im
ageWidth
).
arg
(
image
Height
).
arg
(
imgColors
);
QByteArray
tmpImage
(
header
.
toStdString
().
c_str
(),
header
.
toStdString
().
size
());
QByteArray
tmpImage
(
header
.
toStdString
().
c_str
(),
header
.
toStdString
().
size
());
tmpImage
.
append
(
imageRecBuffer
);
tmpImage
.
append
(
imageRecBuffer
);
...
@@ -1451,7 +1450,7 @@ void UAS::requestImage()
...
@@ -1451,7 +1450,7 @@ void UAS::requestImage()
if
(
imagePacketsArrived
==
0
)
if
(
imagePacketsArrived
==
0
)
{
{
mavlink_message_t
msg
;
mavlink_message_t
msg
;
mavlink_msg_data_transmission_handshake_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
DATA_TYPE_JPEG_IMAGE
,
0
,
0
,
0
,
50
);
mavlink_msg_data_transmission_handshake_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
msg
,
DATA_TYPE_JPEG_IMAGE
,
0
,
0
,
0
,
0
,
0
,
50
);
sendMessage
(
msg
);
sendMessage
(
msg
);
}
}
#endif
#endif
...
...
src/uas/UAS.h
View file @
6187d71c
...
@@ -214,6 +214,8 @@ protected: //COMMENTS FOR TEST UNIT
...
@@ -214,6 +214,8 @@ protected: //COMMENTS FOR TEST UNIT
int
imagePayload
;
///< Payload size per transmitted packet (bytes). Standard is 254, and decreases when image resolution increases.
int
imagePayload
;
///< Payload size per transmitted packet (bytes). Standard is 254, and decreases when image resolution increases.
int
imageQuality
;
///< Quality of the transmitted image (percentage)
int
imageQuality
;
///< Quality of the transmitted image (percentage)
int
imageType
;
///< Type of the transmitted image (BMP, PNG, JPEG, RAW 8 bit, RAW 32 bit)
int
imageType
;
///< Type of the transmitted image (BMP, PNG, JPEG, RAW 8 bit, RAW 32 bit)
int
imageWidth
;
///< Width of the image stream
int
imageHeight
;
///< Width of the image stream
QByteArray
imageRecBuffer
;
///< Buffer for the incoming bytestream
QByteArray
imageRecBuffer
;
///< Buffer for the incoming bytestream
QImage
image
;
///< Image data of last completely transmitted image
QImage
image
;
///< Image data of last completely transmitted image
quint64
imageStart
;
quint64
imageStart
;
...
...
src/uas/UASWaypointManager.cc
View file @
6187d71c
...
@@ -114,6 +114,9 @@ void UASWaypointManager::handleGlobalPositionChanged(UASInterface* mav, double l
...
@@ -114,6 +114,9 @@ void UASWaypointManager::handleGlobalPositionChanged(UASInterface* mav, double l
{
{
Q_UNUSED
(
mav
);
Q_UNUSED
(
mav
);
Q_UNUSED
(
time
);
Q_UNUSED
(
time
);
Q_UNUSED
(
alt
);
Q_UNUSED
(
lon
);
Q_UNUSED
(
lat
);
if
(
waypointsEditable
.
count
()
>
0
&&
currentWaypointEditable
&&
(
currentWaypointEditable
->
getFrame
()
==
MAV_FRAME_GLOBAL
||
currentWaypointEditable
->
getFrame
()
==
MAV_FRAME_GLOBAL_RELATIVE_ALT
))
if
(
waypointsEditable
.
count
()
>
0
&&
currentWaypointEditable
&&
(
currentWaypointEditable
->
getFrame
()
==
MAV_FRAME_GLOBAL
||
currentWaypointEditable
->
getFrame
()
==
MAV_FRAME_GLOBAL_RELATIVE_ALT
))
{
{
// TODO FIXME Calculate distance
// TODO FIXME Calculate distance
...
@@ -240,6 +243,7 @@ void UASWaypointManager::handleWaypointRequest(quint8 systemId, quint8 compId, m
...
@@ -240,6 +243,7 @@ void UASWaypointManager::handleWaypointRequest(quint8 systemId, quint8 compId, m
void
UASWaypointManager
::
handleWaypointReached
(
quint8
systemId
,
quint8
compId
,
mavlink_mission_item_reached_t
*
wpr
)
void
UASWaypointManager
::
handleWaypointReached
(
quint8
systemId
,
quint8
compId
,
mavlink_mission_item_reached_t
*
wpr
)
{
{
Q_UNUSED
(
compId
);
if
(
!
uas
)
return
;
if
(
!
uas
)
return
;
if
(
systemId
==
uasid
)
{
if
(
systemId
==
uasid
)
{
emit
updateStatusString
(
QString
(
"Reached waypoint %1"
).
arg
(
wpr
->
seq
));
emit
updateStatusString
(
QString
(
"Reached waypoint %1"
).
arg
(
wpr
->
seq
));
...
...
src/ui/HSIDisplay.cc
View file @
6187d71c
...
@@ -486,6 +486,11 @@ void HSIDisplay::updatePositionZControllerEnabled(bool enabled)
...
@@ -486,6 +486,11 @@ void HSIDisplay::updatePositionZControllerEnabled(bool enabled)
void
HSIDisplay
::
updateObjectPosition
(
unsigned
int
time
,
int
id
,
int
type
,
const
QString
&
name
,
int
quality
,
float
bearing
,
float
distance
)
void
HSIDisplay
::
updateObjectPosition
(
unsigned
int
time
,
int
id
,
int
type
,
const
QString
&
name
,
int
quality
,
float
bearing
,
float
distance
)
{
{
Q_UNUSED
(
quality
);
Q_UNUSED
(
name
);
Q_UNUSED
(
type
);
Q_UNUSED
(
id
);
Q_UNUSED
(
time
);
// FIXME add multi-object support
// FIXME add multi-object support
QPainter
painter
(
this
);
QPainter
painter
(
this
);
QColor
color
(
Qt
::
yellow
);
QColor
color
(
Qt
::
yellow
);
...
...
src/ui/QGCMAVLinkInspector.cc
View file @
6187d71c
...
@@ -6,6 +6,9 @@
...
@@ -6,6 +6,9 @@
#include <QDebug>
#include <QDebug>
const
float
QGCMAVLinkInspector
::
updateHzLowpass
=
0.2
f
;
const
unsigned
int
QGCMAVLinkInspector
::
updateInterval
=
1000U
;
QGCMAVLinkInspector
::
QGCMAVLinkInspector
(
MAVLinkProtocol
*
protocol
,
QWidget
*
parent
)
:
QGCMAVLinkInspector
::
QGCMAVLinkInspector
(
MAVLinkProtocol
*
protocol
,
QWidget
*
parent
)
:
QWidget
(
parent
),
QWidget
(
parent
),
ui
(
new
Ui
::
QGCMAVLinkInspector
)
ui
(
new
Ui
::
QGCMAVLinkInspector
)
...
...
src/ui/QGCMAVLinkInspector.h
View file @
6187d71c
...
@@ -37,8 +37,8 @@ protected:
...
@@ -37,8 +37,8 @@ protected:
// Update one message field
// Update one message field
void
updateField
(
int
msgid
,
int
fieldid
,
QTreeWidgetItem
*
item
);
void
updateField
(
int
msgid
,
int
fieldid
,
QTreeWidgetItem
*
item
);
static
const
unsigned
int
updateInterval
=
1000
;
static
const
unsigned
int
updateInterval
;
static
const
float
updateHzLowpass
=
0
.
2
f
;
static
const
float
updateHzLowpass
;
private:
private:
Ui
::
QGCMAVLinkInspector
*
ui
;
Ui
::
QGCMAVLinkInspector
*
ui
;
...
...
src/ui/QGCRGBDView.cc
View file @
6187d71c
...
@@ -265,5 +265,7 @@ void QGCRGBDView::updateData(UASInterface *uas)
...
@@ -265,5 +265,7 @@ void QGCRGBDView::updateData(UASInterface *uas)
}
}
glImage
=
QGLWidget
::
convertToGLFormat
(
fill
);
glImage
=
QGLWidget
::
convertToGLFormat
(
fill
);
#else
Q_UNUSED
(
uas
);
#endif
#endif
}
}
src/ui/WaypointEditableView.cc
View file @
6187d71c
...
@@ -310,9 +310,7 @@ void WaypointEditableView::changeViewMode(QGC_WAYPOINTEDITABLEVIEW_MODE mode)
...
@@ -310,9 +310,7 @@ void WaypointEditableView::changeViewMode(QGC_WAYPOINTEDITABLEVIEW_MODE mode)
}
}
void
WaypointEditableView
::
updateFrameView
(
int
frame
)
void
WaypointEditableView
::
updateFrameView
(
int
frame
)
{
{
std
::
cerr
<<
"update frame view: "
<<
frame
<<
std
::
endl
;
//int custom_index = m_ui->comboBox_action->findData(MAV_CMD_ENUM_END);
switch
(
frame
)
{
switch
(
frame
)
{
case
MAV_FRAME_GLOBAL
:
case
MAV_FRAME_GLOBAL
:
case
MAV_FRAME_GLOBAL_RELATIVE_ALT
:
case
MAV_FRAME_GLOBAL_RELATIVE_ALT
:
...
...
src/ui/WaypointEditableView.ui
View file @
6187d71c
...
@@ -105,6 +105,18 @@ QPushButton:pressed {
...
@@ -105,6 +105,18 @@ QPushButton:pressed {
</property>
</property>
<item>
<item>
<widget
class=
"QCheckBox"
name=
"selectedBox"
>
<widget
class=
"QCheckBox"
name=
"selectedBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
25
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"focusPolicy"
>
<property
name=
"focusPolicy"
>
<enum>
Qt::TabFocus
</enum>
<enum>
Qt::TabFocus
</enum>
</property>
</property>
...
@@ -127,9 +139,15 @@ QPushButton:pressed {
...
@@ -127,9 +139,15 @@ QPushButton:pressed {
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"idLabel"
>
<widget
class=
"QLabel"
name=
"idLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<property
name=
"minimumSize"
>
<size>
<size>
<width>
1
5
</width>
<width>
2
5
</width>
<height>
0
</height>
<height>
0
</height>
</size>
</size>
</property>
</property>
...
@@ -471,6 +489,12 @@ QPushButton:pressed {
...
@@ -471,6 +489,12 @@ QPushButton:pressed {
</item>
</item>
<item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"acceptanceSpinBox"
>
<widget
class=
"QDoubleSpinBox"
name=
"acceptanceSpinBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"toolTip"
>
<property
name=
"toolTip"
>
<string>
Uncertainty radius in meters
<string>
Uncertainty radius in meters
where to accept this waypoint as reached
</string>
where to accept this waypoint as reached
</string>
...
@@ -488,6 +512,12 @@ where to accept this waypoint as reached</string>
...
@@ -488,6 +512,12 @@ where to accept this waypoint as reached</string>
</item>
</item>
<item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"holdTimeSpinBox"
>
<widget
class=
"QDoubleSpinBox"
name=
"holdTimeSpinBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"toolTip"
>
<property
name=
"toolTip"
>
<string>
Rotaty wing and ground vehicles only:
<string>
Rotaty wing and ground vehicles only:
Time to stay at this position before advancing
</string>
Time to stay at this position before advancing
</string>
...
@@ -505,6 +535,12 @@ Time to stay at this position before advancing</string>
...
@@ -505,6 +535,12 @@ Time to stay at this position before advancing</string>
</item>
</item>
<item>
<item>
<widget
class=
"QSpinBox"
name=
"turnsSpinBox"
>
<widget
class=
"QSpinBox"
name=
"turnsSpinBox"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"toolTip"
>
<property
name=
"toolTip"
>
<string>
Number of turns to loiter
</string>
<string>
Number of turns to loiter
</string>
</property>
</property>
...
@@ -581,6 +617,12 @@ Time to stay at this position before advancing</string>
...
@@ -581,6 +617,12 @@ Time to stay at this position before advancing</string>
</item>
</item>
<item>
<item>
<widget
class=
"QCheckBox"
name=
"autoContinue"
>
<widget
class=
"QCheckBox"
name=
"autoContinue"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"MinimumExpanding"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"toolTip"
>
<property
name=
"toolTip"
>
<string>
Automatically continue after this waypoint
</string>
<string>
Automatically continue after this waypoint
</string>
</property>
</property>
...
...
src/ui/WaypointViewOnlyView.ui
View file @
6187d71c
...
@@ -75,7 +75,7 @@ margin-top: 1ex; /* leave space at the top for the title */
...
@@ -75,7 +75,7 @@ margin-top: 1ex; /* leave space at the top for the title */
<property
name=
"checkable"
>
<property
name=
"checkable"
>
<bool>
false
</bool>
<bool>
false
</bool>
</property>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"
3
,2,100,10,5,1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"
0
,2,100,10,5,1"
>
<property
name=
"spacing"
>
<property
name=
"spacing"
>
<number>
2
</number>
<number>
2
</number>
</property>
</property>
...
@@ -85,11 +85,17 @@ margin-top: 1ex; /* leave space at the top for the title */
...
@@ -85,11 +85,17 @@ margin-top: 1ex; /* leave space at the top for the title */
<item>
<item>
<widget
class=
"QCheckBox"
name=
"current"
>
<widget
class=
"QCheckBox"
name=
"current"
>
<property
name=
"sizePolicy"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"
Minimum
"
vsizetype=
"Fixed"
>
<sizepolicy
hsizetype=
"
Fixed
"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</sizepolicy>
</property>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
25
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"toolTip"
>
<property
name=
"toolTip"
>
<string>
Currently executed waypoint
</string>
<string>
Currently executed waypoint
</string>
</property>
</property>
...
@@ -103,9 +109,27 @@ margin-top: 1ex; /* leave space at the top for the title */
...
@@ -103,9 +109,27 @@ margin-top: 1ex; /* leave space at the top for the title */
</item>
</item>
<item>
<item>
<widget
class=
"QLabel"
name=
"idLabel"
>
<widget
class=
"QLabel"
name=
"idLabel"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
25
</width>
<height>
0
</height>
</size>
</property>
<property
name=
"lineWidth"
>
<number>
1
</number>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
ID
</string>
<string>
ID
</string>
</property>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</widget>
</item>
</item>
<item>
<item>
...
@@ -160,6 +184,9 @@ margin-top: 1ex; /* leave space at the top for the title */
...
@@ -160,6 +184,9 @@ margin-top: 1ex; /* leave space at the top for the title */
<property
name=
"text"
>
<property
name=
"text"
>
<string>
Frame
</string>
<string>
Frame
</string>
</property>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
</set>
</property>
</widget>
</widget>
</item>
</item>
<item>
<item>
...
...
src/ui/map/QGCMapWidget.cc
View file @
6187d71c
...
@@ -10,7 +10,7 @@ QGCMapWidget::QGCMapWidget(QWidget *parent) :
...
@@ -10,7 +10,7 @@ QGCMapWidget::QGCMapWidget(QWidget *parent) :
mapcontrol
::
OPMapWidget
(
parent
),
mapcontrol
::
OPMapWidget
(
parent
),
currWPManager
(
NULL
),
currWPManager
(
NULL
),
firingWaypointChange
(
NULL
),
firingWaypointChange
(
NULL
),
maxUpdateInterval
(
2.1
),
// 2 seconds
maxUpdateInterval
(
2.1
f
),
// 2 seconds
followUAVEnabled
(
false
),
followUAVEnabled
(
false
),
trailType
(
mapcontrol
::
UAVTrailType
::
ByTimeElapsed
),
trailType
(
mapcontrol
::
UAVTrailType
::
ByTimeElapsed
),
trailInterval
(
2.0
f
),
trailInterval
(
2.0
f
),
...
...
src/ui/uas/UASControlWidget.cc
View file @
6187d71c
...
@@ -44,6 +44,7 @@ This file is part of the PIXHAWK project
...
@@ -44,6 +44,7 @@ This file is part of the PIXHAWK project
UASControlWidget
::
UASControlWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
),
UASControlWidget
::
UASControlWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
),
uas
(
0
),
uas
(
0
),
uasMode
(
0
),
engineOn
(
false
)
engineOn
(
false
)
{
{
ui
.
setupUi
(
this
);
ui
.
setupUi
(
this
);
...
@@ -59,6 +60,8 @@ UASControlWidget::UASControlWidget(QWidget *parent) : QWidget(parent),
...
@@ -59,6 +60,8 @@ UASControlWidget::UASControlWidget(QWidget *parent) : QWidget(parent),
connect
(
ui
.
modeComboBox
,
SIGNAL
(
activated
(
int
)),
this
,
SLOT
(
setMode
(
int
)));
connect
(
ui
.
modeComboBox
,
SIGNAL
(
activated
(
int
)),
this
,
SLOT
(
setMode
(
int
)));
connect
(
ui
.
setModeButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
transmitMode
()));
connect
(
ui
.
setModeButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
transmitMode
()));
uasMode
=
ui
.
modeComboBox
->
itemData
(
ui
.
modeComboBox
->
currentIndex
()).
toInt
();
ui
.
modeComboBox
->
setCurrentIndex
(
0
);
ui
.
modeComboBox
->
setCurrentIndex
(
0
);
ui
.
gridLayout
->
setAlignment
(
Qt
::
AlignTop
);
ui
.
gridLayout
->
setAlignment
(
Qt
::
AlignTop
);
...
@@ -67,7 +70,8 @@ UASControlWidget::UASControlWidget(QWidget *parent) : QWidget(parent),
...
@@ -67,7 +70,8 @@ UASControlWidget::UASControlWidget(QWidget *parent) : QWidget(parent),
void
UASControlWidget
::
setUAS
(
UASInterface
*
uas
)
void
UASControlWidget
::
setUAS
(
UASInterface
*
uas
)
{
{
if
(
this
->
uas
!=
0
)
{
if
(
this
->
uas
!=
0
)
{
UASInterface
*
oldUAS
=
UASManager
::
instance
()
->
getUASForId
(
this
->
uas
);
UASInterface
*
oldUAS
=
UASManager
::
instance
()
->
getUASForId
(
this
->
uas
);
disconnect
(
ui
.
controlButton
,
SIGNAL
(
clicked
()),
oldUAS
,
SLOT
(
armSystem
()));
disconnect
(
ui
.
controlButton
,
SIGNAL
(
clicked
()),
oldUAS
,
SLOT
(
armSystem
()));
disconnect
(
ui
.
liftoffButton
,
SIGNAL
(
clicked
()),
oldUAS
,
SLOT
(
launch
()));
disconnect
(
ui
.
liftoffButton
,
SIGNAL
(
clicked
()),
oldUAS
,
SLOT
(
launch
()));
...
@@ -101,9 +105,12 @@ UASControlWidget::~UASControlWidget()
...
@@ -101,9 +105,12 @@ UASControlWidget::~UASControlWidget()
void
UASControlWidget
::
updateStatemachine
()
void
UASControlWidget
::
updateStatemachine
()
{
{
if
(
engineOn
)
{
if
(
engineOn
)
{
ui
.
controlButton
->
setText
(
tr
(
"DISARM SYSTEM"
));
ui
.
controlButton
->
setText
(
tr
(
"DISARM SYSTEM"
));
}
else
{
}
else
{
ui
.
controlButton
->
setText
(
tr
(
"ARM SYSTEM"
));
ui
.
controlButton
->
setText
(
tr
(
"ARM SYSTEM"
));
}
}
}
}
...
@@ -139,7 +146,8 @@ void UASControlWidget::updateMode(int uas,QString mode,QString description)
...
@@ -139,7 +146,8 @@ void UASControlWidget::updateMode(int uas,QString mode,QString description)
void
UASControlWidget
::
updateState
(
int
state
)
void
UASControlWidget
::
updateState
(
int
state
)
{
{
switch
(
state
)
{
switch
(
state
)
{
case
(
int
)
MAV_STATE_ACTIVE
:
case
(
int
)
MAV_STATE_ACTIVE
:
engineOn
=
true
;
engineOn
=
true
;
ui
.
controlButton
->
setText
(
tr
(
"DISARM SYSTEM"
));
ui
.
controlButton
->
setText
(
tr
(
"DISARM SYSTEM"
));
...
...
src/ui/uas/UASListWidget.cc
View file @
6187d71c
...
@@ -114,6 +114,7 @@ void UASListWidget::activeUAS(UASInterface* uas)
...
@@ -114,6 +114,7 @@ void UASListWidget::activeUAS(UASInterface* uas)
void
UASListWidget
::
removeUAS
(
UASInterface
*
uas
)
void
UASListWidget
::
removeUAS
(
UASInterface
*
uas
)
{
{
Q_UNUSED
(
uas
);
// uasViews.remove(uas);
// uasViews.remove(uas);
// listLayout->removeWidget(uasViews.value(uas));
// listLayout->removeWidget(uasViews.value(uas));
// uasViews.value(uas)->deleteLater();
// uasViews.value(uas)->deleteLater();
...
...
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