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
bed216dd
Commit
bed216dd
authored
Feb 26, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed last waypoint widget issues
parent
58c62971
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
11 deletions
+36
-11
GAudioOutput.h
src/GAudioOutput.h
+2
-1
Waypoint.cc
src/Waypoint.cc
+5
-1
WaypointView.cc
src/ui/WaypointView.cc
+27
-7
QGCCustomWaypointAction.ui
src/ui/mission/QGCCustomWaypointAction.ui
+2
-2
No files found.
src/GAudioOutput.h
View file @
bed216dd
...
...
@@ -36,7 +36,8 @@ This file is part of the PIXHAWK project
#include <QTimer>
#include <QStringList>
#ifdef Q_OS_MAC
#include <Phonon>
#include <MediaObject>
#include <AudioOutput>
#endif
#ifdef Q_OS_LINUX
//#include <flite/flite.h>
...
...
src/Waypoint.cc
View file @
bed216dd
...
...
@@ -29,8 +29,10 @@ This file is part of the QGROUNDCONTROL project
*
*/
#include "Waypoint.h"
#include <QStringList>
#include <QDebug>
#include "Waypoint.h"
Waypoint
::
Waypoint
(
quint16
_id
,
double
_x
,
double
_y
,
double
_z
,
double
_param1
,
double
_param2
,
double
_param3
,
double
_param4
,
bool
_autocontinue
,
bool
_current
,
MAV_FRAME
_frame
,
MAV_CMD
_action
)
...
...
@@ -229,6 +231,8 @@ void Waypoint::setAcceptanceRadius(double radius)
void
Waypoint
::
setParam1
(
double
param1
)
{
qDebug
()
<<
"SENDER:"
<<
QObject
::
sender
();
qDebug
()
<<
"PARAM1 SET REQ:"
<<
param1
;
if
(
this
->
param1
!=
param1
)
{
this
->
param1
=
param1
;
...
...
src/ui/WaypointView.cc
View file @
bed216dd
...
...
@@ -43,10 +43,10 @@ WaypointView::WaypointView(Waypoint* wp, QWidget* parent) :
m_ui
->
comboBox_action
->
addItem
(
tr
(
"NAV: Loiter Turns"
),
MAV_CMD_NAV_LOITER_TURNS
);
m_ui
->
comboBox_action
->
addItem
(
tr
(
"NAV: Ret. to Launch"
),
MAV_CMD_NAV_RETURN_TO_LAUNCH
);
m_ui
->
comboBox_action
->
addItem
(
tr
(
"NAV: Land"
),
MAV_CMD_NAV_LAND
);
m_ui
->
comboBox_action
->
addItem
(
tr
(
"NAV: Target"
),
MAV_CMD_NAV_TARGET
);
m_ui
->
comboBox_action
->
addItem
(
tr
(
"IF: Delay over"
),
MAV_CMD_CONDITION_DELAY
);
m_ui
->
comboBox_action
->
addItem
(
tr
(
"IF: Yaw angle is"
),
MAV_CMD_CONDITION_YAW
);
m_ui
->
comboBox_action
->
addItem
(
tr
(
"DO: Jump to Index"
),
MAV_CMD_DO_JUMP
);
//
m_ui->comboBox_action->addItem(tr("NAV: Target"),MAV_CMD_NAV_TARGET);
//
m_ui->comboBox_action->addItem(tr("IF: Delay over"),MAV_CMD_CONDITION_DELAY);
//
m_ui->comboBox_action->addItem(tr("IF: Yaw angle is"),MAV_CMD_CONDITION_YAW);
//
m_ui->comboBox_action->addItem(tr("DO: Jump to Index"),MAV_CMD_DO_JUMP);
m_ui
->
comboBox_action
->
addItem
(
tr
(
"Other"
),
MAV_CMD_ENUM_END
);
// add frames
...
...
@@ -261,6 +261,7 @@ void WaypointView::changedAction(int index)
void
WaypointView
::
changeViewMode
(
QGC_WAYPOINTVIEW_MODE
mode
)
{
viewMode
=
mode
;
switch
(
mode
)
{
case
QGC_WAYPOINTVIEW_MODE_NAV
:
...
...
@@ -285,6 +286,9 @@ void WaypointView::changeViewMode(QGC_WAYPOINTVIEW_MODE mode)
m_ui
->
lonSpinBox
->
hide
();
m_ui
->
altSpinBox
->
hide
();
int
action_index
=
m_ui
->
comboBox_action
->
findData
(
MAV_CMD_ENUM_END
);
m_ui
->
comboBox_action
->
setCurrentIndex
(
action_index
);
// Show action widget
if
(
!
m_ui
->
customActionWidget
->
isVisible
())
{
...
...
@@ -296,6 +300,7 @@ void WaypointView::changeViewMode(QGC_WAYPOINTVIEW_MODE mode)
}
break
;
}
}
void
WaypointView
::
updateFrameView
(
int
frame
)
...
...
@@ -438,9 +443,12 @@ void WaypointView::updateValues()
}
else
{
// Action ID known, update
m_ui
->
comboBox_action
->
setCurrentIndex
(
action_index
);
updateActionView
(
action
);
if
(
viewMode
!=
QGC_WAYPOINTVIEW_MODE_DIRECT_EDITING
)
{
// Action ID known, update
m_ui
->
comboBox_action
->
setCurrentIndex
(
action_index
);
updateActionView
(
action
);
}
}
}
switch
(
action
)
...
...
@@ -459,7 +467,9 @@ void WaypointView::updateValues()
if
(
m_ui
->
yawSpinBox
->
value
()
!=
wp
->
getYaw
())
{
if
(
!
m_ui
->
yawSpinBox
->
isVisible
())
m_ui
->
yawSpinBox
->
blockSignals
(
true
);
m_ui
->
yawSpinBox
->
setValue
(
wp
->
getYaw
());
if
(
!
m_ui
->
yawSpinBox
->
isVisible
())
m_ui
->
yawSpinBox
->
blockSignals
(
false
);
}
if
(
m_ui
->
selectedBox
->
isChecked
()
!=
wp
->
getCurrent
())
{
...
...
@@ -472,23 +482,33 @@ void WaypointView::updateValues()
m_ui
->
idLabel
->
setText
(
QString
(
"%1"
).
arg
(
wp
->
getId
()));
if
(
m_ui
->
orbitSpinBox
->
value
()
!=
wp
->
getLoiterOrbit
())
{
if
(
!
m_ui
->
orbitSpinBox
->
isVisible
())
m_ui
->
orbitSpinBox
->
blockSignals
(
true
);
m_ui
->
orbitSpinBox
->
setValue
(
wp
->
getLoiterOrbit
());
if
(
!
m_ui
->
orbitSpinBox
->
isVisible
())
m_ui
->
orbitSpinBox
->
blockSignals
(
false
);
}
if
(
m_ui
->
acceptanceSpinBox
->
value
()
!=
wp
->
getAcceptanceRadius
())
{
if
(
!
m_ui
->
acceptanceSpinBox
->
isVisible
())
m_ui
->
acceptanceSpinBox
->
blockSignals
(
true
);
m_ui
->
acceptanceSpinBox
->
setValue
(
wp
->
getAcceptanceRadius
());
if
(
!
m_ui
->
acceptanceSpinBox
->
isVisible
())
m_ui
->
acceptanceSpinBox
->
blockSignals
(
false
);
}
if
(
m_ui
->
holdTimeSpinBox
->
value
()
!=
wp
->
getHoldTime
())
{
if
(
!
m_ui
->
holdTimeSpinBox
->
isVisible
())
m_ui
->
holdTimeSpinBox
->
blockSignals
(
true
);
m_ui
->
holdTimeSpinBox
->
setValue
(
wp
->
getHoldTime
());
if
(
!
m_ui
->
holdTimeSpinBox
->
isVisible
())
m_ui
->
holdTimeSpinBox
->
blockSignals
(
false
);
}
if
(
m_ui
->
turnsSpinBox
->
value
()
!=
wp
->
getTurns
())
{
if
(
!
m_ui
->
turnsSpinBox
->
isVisible
())
m_ui
->
turnsSpinBox
->
blockSignals
(
true
);
m_ui
->
turnsSpinBox
->
setValue
(
wp
->
getTurns
());
if
(
!
m_ui
->
turnsSpinBox
->
isVisible
())
m_ui
->
turnsSpinBox
->
blockSignals
(
false
);
}
if
(
m_ui
->
takeOffAngleSpinBox
->
value
()
!=
wp
->
getParam1
())
{
if
(
!
m_ui
->
takeOffAngleSpinBox
->
isVisible
())
m_ui
->
takeOffAngleSpinBox
->
blockSignals
(
true
);
m_ui
->
takeOffAngleSpinBox
->
setValue
(
wp
->
getParam1
());
if
(
!
m_ui
->
takeOffAngleSpinBox
->
isVisible
())
m_ui
->
takeOffAngleSpinBox
->
blockSignals
(
false
);
}
// UPDATE CUSTOM ACTION WIDGET
...
...
src/ui/mission/QGCCustomWaypointAction.ui
View file @
bed216dd
...
...
@@ -6,14 +6,14 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
1
105
</width>
<width>
1
228
</width>
<height>
25
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"10,
1
0,10,10,10,10,0,0"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
stretch=
"10,0,10,10,10,10,0,0"
>
<property
name=
"spacing"
>
<number>
5
</number>
</property>
...
...
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