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
e89983da
Commit
e89983da
authored
Jan 10, 2012
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some display bugs in editable waypoints
parent
faac2ca5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
21 deletions
+38
-21
WaypointEditableView.cc
src/ui/WaypointEditableView.cc
+38
-21
No files found.
src/ui/WaypointEditableView.cc
View file @
e89983da
...
...
@@ -234,6 +234,7 @@ void WaypointEditableView::updateActionView(int action)
*/
void
WaypointEditableView
::
changedAction
(
int
index
)
{
MAV_FRAME
cur_frame
=
(
MAV_FRAME
)
m_ui
->
comboBox_frame
->
itemData
(
m_ui
->
comboBox_frame
->
currentIndex
()).
toUInt
();
// set waypoint action
int
actionIndex
=
m_ui
->
comboBox_action
->
itemData
(
index
).
toUInt
();
if
(
actionIndex
<
MAV_CMD_ENUM_END
&&
actionIndex
>=
0
)
{
...
...
@@ -254,8 +255,8 @@ void WaypointEditableView::changedAction(int index)
case
MAV_CMD_NAV_LOITER_TURNS
:
case
MAV_CMD_NAV_LOITER_TIME
:
changeViewMode
(
QGC_WAYPOINTEDITABLEVIEW_MODE_NAV
);
// Update frame view
updateFrameView
(
m_ui
->
comboBox_frame
->
currentIndex
()
);
// Update frame view
updateFrameView
(
cur_frame
);
// Update view
updateActionView
(
actionIndex
);
break
;
...
...
@@ -310,29 +311,45 @@ void WaypointEditableView::changeViewMode(QGC_WAYPOINTEDITABLEVIEW_MODE mode)
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
)
{
case
MAV_FRAME_GLOBAL
:
case
MAV_FRAME_GLOBAL_RELATIVE_ALT
:
m_ui
->
posNSpinBox
->
hide
();
m_ui
->
posESpinBox
->
hide
();
m_ui
->
posDSpinBox
->
hide
();
m_ui
->
lonSpinBox
->
show
();
m_ui
->
latSpinBox
->
show
();
m_ui
->
altSpinBox
->
show
();
// Coordinate frame
m_ui
->
comboBox_frame
->
show
();
m_ui
->
customActionWidget
->
hide
();
if
(
viewMode
!=
QGC_WAYPOINTEDITABLEVIEW_MODE_DIRECT_EDITING
)
{
m_ui
->
posNSpinBox
->
hide
();
m_ui
->
posESpinBox
->
hide
();
m_ui
->
posDSpinBox
->
hide
();
m_ui
->
lonSpinBox
->
show
();
m_ui
->
latSpinBox
->
show
();
m_ui
->
altSpinBox
->
show
();
// Coordinate frame
m_ui
->
comboBox_frame
->
show
();
m_ui
->
customActionWidget
->
hide
();
}
else
// do not hide customActionWidget if Command is set to "Other"
{
m_ui
->
customActionWidget
->
show
();
}
break
;
case
MAV_FRAME_LOCAL_NED
:
m_ui
->
lonSpinBox
->
hide
();
m_ui
->
latSpinBox
->
hide
();
m_ui
->
altSpinBox
->
hide
();
m_ui
->
posNSpinBox
->
show
();
m_ui
->
posESpinBox
->
show
();
m_ui
->
posDSpinBox
->
show
();
// Coordinate frame
m_ui
->
comboBox_frame
->
show
();
m_ui
->
customActionWidget
->
hide
();
if
(
viewMode
!=
QGC_WAYPOINTEDITABLEVIEW_MODE_DIRECT_EDITING
)
{
m_ui
->
lonSpinBox
->
hide
();
m_ui
->
latSpinBox
->
hide
();
m_ui
->
altSpinBox
->
hide
();
m_ui
->
posNSpinBox
->
show
();
m_ui
->
posESpinBox
->
show
();
m_ui
->
posDSpinBox
->
show
();
// Coordinate frame
m_ui
->
comboBox_frame
->
show
();
m_ui
->
customActionWidget
->
hide
();
}
else
// do not hide customActionWidget if Command is set to "Other"
{
m_ui
->
customActionWidget
->
show
();
}
break
;
default:
std
::
cerr
<<
"unknown frame"
<<
std
::
endl
;
...
...
@@ -526,7 +543,7 @@ void WaypointEditableView::updateValues()
{
// Action ID known, update
m_ui
->
comboBox_action
->
setCurrentIndex
(
action_index
);
updateActionView
(
action
);
updateActionView
(
action
);
}
}
}
...
...
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