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
68bad099
Commit
68bad099
authored
Nov 15, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of github.com:pixhawk/qgroundcontrol into dev
parents
8bc92cfc
ff7f7242
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
3 deletions
+61
-3
Waypoint.cc
src/Waypoint.cc
+5
-0
Waypoint.h
src/Waypoint.h
+11
-0
UAS.cc
src/uas/UAS.cc
+2
-0
WaypointGlobalView.cc
src/ui/WaypointGlobalView.cc
+5
-0
WaypointView.cc
src/ui/WaypointView.cc
+24
-0
WaypointView.h
src/ui/WaypointView.h
+1
-0
WaypointView.ui
src/ui/WaypointView.ui
+13
-3
No files found.
src/Waypoint.cc
View file @
68bad099
...
...
@@ -100,6 +100,11 @@ void Waypoint::setYaw(float yaw)
this
->
yaw
=
yaw
;
}
void
Waypoint
::
setType
(
type_enum
type
)
{
this
->
type
=
type
;
}
void
Waypoint
::
setAutocontinue
(
bool
autoContinue
)
{
this
->
autocontinue
=
autoContinue
;
...
...
src/Waypoint.h
View file @
68bad099
...
...
@@ -36,6 +36,7 @@ This file is part of the PIXHAWK project
#include <QObject>
#include <QString>
#include <QTextStream>
#include <inttypes.h>
class
Waypoint
:
public
QObject
{
...
...
@@ -58,6 +59,14 @@ public:
void
save
(
QTextStream
&
saveStream
);
bool
load
(
QTextStream
&
loadStream
);
enum
type_enum
{
GLOBAL
=
0
,
LOCAL
=
1
,
GLOBAL_ORBIT
=
2
,
LOCAL_ORBIT
=
3
};
protected:
quint16
id
;
...
...
@@ -65,6 +74,7 @@ protected:
float
y
;
float
z
;
float
yaw
;
type_enum
type
;
bool
autocontinue
;
bool
current
;
float
orbit
;
...
...
@@ -76,6 +86,7 @@ public slots:
void
setY
(
float
y
);
void
setZ
(
float
z
);
void
setYaw
(
float
yaw
);
void
setType
(
type_enum
type
);
void
setAutocontinue
(
bool
autoContinue
);
void
setCurrent
(
bool
current
);
void
setOrbit
(
float
orbit
);
...
...
src/uas/UAS.cc
View file @
68bad099
...
...
@@ -175,6 +175,8 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
getStatusForCode
((
int
)
state
.
status
,
uasState
,
stateDescription
);
emit
statusChanged
(
this
,
uasState
,
stateDescription
);
emit
statusChanged
(
this
->
status
);
emit
loadChanged
(
this
,
state
.
load
/
10.0
f
);
emit
UAS
::
valueChanged
(
this
,
"Load"
,
((
float
)
state
.
load
)
/
1000.0
f
,
MG
::
TIME
::
getGroundTimeNow
());
stateAudio
=
" changed status to "
+
uasState
;
}
...
...
src/ui/WaypointGlobalView.cc
View file @
68bad099
...
...
@@ -12,6 +12,9 @@ WaypointGlobalView::WaypointGlobalView(Waypoint* wp,QWidget *parent) :
ui
->
m_orbitalSpinBox
->
hide
();
// set type
wp
->
setType
(
Waypoint
::
GLOBAL
);
// Read values and set user interface
updateValues
();
...
...
@@ -197,11 +200,13 @@ void WaypointGlobalView::changeOrbitalState(int state)
{
ui
->
m_orbitalSpinBox
->
setEnabled
(
true
);
ui
->
m_orbitalSpinBox
->
show
();
wp
->
setType
(
Waypoint
::
GLOBAL_ORBIT
);
}
else
{
ui
->
m_orbitalSpinBox
->
setEnabled
(
false
);
ui
->
m_orbitalSpinBox
->
hide
();
wp
->
setType
(
Waypoint
::
GLOBAL
);
}
}
...
...
src/ui/WaypointView.cc
View file @
68bad099
...
...
@@ -46,6 +46,9 @@ WaypointView::WaypointView(Waypoint* wp, QWidget* parent) :
m_ui
->
setupUi
(
this
);
this
->
wp
=
wp
;
wp
->
setType
(
Waypoint
::
LOCAL
);
m_ui
->
orbitSpinBox
->
setEnabled
(
false
);
m_ui
->
orbitSpinBox
->
hide
();
// Read values and set user interface
updateValues
();
...
...
@@ -64,6 +67,9 @@ WaypointView::WaypointView(Waypoint* wp, QWidget* parent) :
connect
(
m_ui
->
autoContinue
,
SIGNAL
(
stateChanged
(
int
)),
this
,
SLOT
(
changedAutoContinue
(
int
)));
connect
(
m_ui
->
selectedBox
,
SIGNAL
(
stateChanged
(
int
)),
this
,
SLOT
(
changedCurrent
(
int
)));
connect
(
m_ui
->
orbitCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
this
,
SLOT
(
changeOrbitalState
(
int
)));
connect
(
m_ui
->
orbitSpinBox
,
SIGNAL
(
valueChanged
(
double
)),
wp
,
SLOT
(
setOrbit
(
double
)));
connect
(
m_ui
->
holdTimeSpinBox
,
SIGNAL
(
valueChanged
(
int
)),
wp
,
SLOT
(
setHoldTime
(
int
)));
...
...
@@ -153,3 +159,21 @@ void WaypointView::changeEvent(QEvent *e)
break
;
}
}
void
WaypointView
::
changeOrbitalState
(
int
state
)
{
Q_UNUSED
(
state
);
if
(
m_ui
->
orbitCheckBox
->
isChecked
())
{
m_ui
->
orbitSpinBox
->
setEnabled
(
true
);
m_ui
->
orbitSpinBox
->
show
();
wp
->
setType
(
Waypoint
::
LOCAL_ORBIT
);
}
else
{
m_ui
->
orbitSpinBox
->
setEnabled
(
false
);
m_ui
->
orbitSpinBox
->
hide
();
wp
->
setType
(
Waypoint
::
LOCAL
);
}
}
src/ui/WaypointView.h
View file @
68bad099
...
...
@@ -56,6 +56,7 @@ public slots:
void
moveDown
();
void
remove
();
void
changedAutoContinue
(
int
);
void
changeOrbitalState
(
int
state
);
void
changedCurrent
(
int
);
void
updateValues
(
void
);
...
...
src/ui/WaypointView.ui
View file @
68bad099
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
76
3
</width>
<height>
4
0
</height>
<width>
85
3
</width>
<height>
3
0
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
...
...
@@ -155,7 +155,7 @@ QProgressBar::chunk#thrustBar {
<property
name=
"title"
>
<string/>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"0,0,0,0,0,0,0,0,0,0,0,0,0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"0,0,0,0,0,0,0,0,0,0,0,0,0
,0
"
>
<property
name=
"spacing"
>
<number>
2
</number>
</property>
...
...
@@ -343,6 +343,16 @@ QProgressBar::chunk#thrustBar {
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"orbitCheckBox"
>
<property
name=
"toolTip"
>
<string>
enable orbital mode (loiter at waypoint)
</string>
</property>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"upButton"
>
<property
name=
"minimumSize"
>
...
...
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