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
897ee64f
Commit
897ee64f
authored
Jul 09, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes for ArduPlane level to be shown when ArduPlane firmware is loaded
parent
b22d4023
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
5 deletions
+51
-5
ApmHardwareConfig.cc
src/ui/configuration/ApmHardwareConfig.cc
+29
-4
ApmHardwareConfig.h
src/ui/configuration/ApmHardwareConfig.h
+2
-0
ApmHardwareConfig.ui
src/ui/configuration/ApmHardwareConfig.ui
+20
-1
No files found.
src/ui/configuration/ApmHardwareConfig.cc
View file @
897ee64f
...
...
@@ -39,6 +39,7 @@ ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : QWidget(parent)
ui
.
frameTypeButton
->
setVisible
(
false
);
ui
.
compassButton
->
setVisible
(
false
);
ui
.
accelCalibrateButton
->
setVisible
(
false
);
ui
.
arduPlaneLevelButton
->
setVisible
(
false
);
ui
.
radioCalibrateButton
->
setVisible
(
false
);
ui
.
optionalHardwareButton
->
setVisible
(
false
);
//ui.radio3DRButton->setVisible(false);
...
...
@@ -50,10 +51,6 @@ ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : QWidget(parent)
ui
.
cameraGimbalButton
->
setVisible
(
false
);
//ui.antennaTrackerButton->setVisible(false);
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
frameTypeButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
compassButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
accelCalibrateButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
radioCalibrateButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
optionalHardwareButton
,
SIGNAL
(
toggled
(
bool
)),
ui
.
radio3DRButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
optionalHardwareButton
,
SIGNAL
(
toggled
(
bool
)),
ui
.
batteryMonitorButton
,
SLOT
(
setShown
(
bool
)));
...
...
@@ -87,6 +84,11 @@ ApmHardwareConfig::ApmHardwareConfig(QWidget *parent) : QWidget(parent)
buttonToConfigWidgetMap
[
ui
.
accelCalibrateButton
]
=
accelConfig
;
connect
(
ui
.
accelCalibrateButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
activateStackedWidget
()));
planeLevel
=
new
ApmPlaneLevel
(
this
);
ui
.
stackedWidget
->
addWidget
(
planeLevel
);
buttonToConfigWidgetMap
[
ui
.
arduPlaneLevelButton
]
=
planeLevel
;
connect
(
ui
.
arduPlaneLevelButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
activateStackedWidget
()));
radioConfig
=
new
RadioCalibrationConfig
(
this
);
ui
.
stackedWidget
->
addWidget
(
radioConfig
);
buttonToConfigWidgetMap
[
ui
.
radioCalibrateButton
]
=
radioConfig
;
...
...
@@ -159,6 +161,29 @@ void ApmHardwareConfig::activeUASSet(UASInterface *uas)
{
return
;
}
if
(
uas
->
getSystemType
()
==
MAV_TYPE_FIXED_WING
)
{
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
compassButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
arduPlaneLevelButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
radioCalibrateButton
,
SLOT
(
setShown
(
bool
)));
}
else
if
(
uas
->
getSystemType
()
==
MAV_TYPE_QUADROTOR
)
{
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
frameTypeButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
compassButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
accelCalibrateButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
radioCalibrateButton
,
SLOT
(
setShown
(
bool
)));
}
else
if
(
uas
->
getSystemType
()
==
MAV_TYPE_GROUND_ROVER
)
{
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
compassButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
radioCalibrateButton
,
SLOT
(
setShown
(
bool
)));
}
else
{
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
compassButton
,
SLOT
(
setShown
(
bool
)));
connect
(
ui
.
manditoryHardware
,
SIGNAL
(
toggled
(
bool
)),
ui
.
radioCalibrateButton
,
SLOT
(
setShown
(
bool
)));
}
ui
.
firmwareButton
->
setVisible
(
true
);
ui
.
manditoryHardware
->
setVisible
(
true
);
ui
.
manditoryHardware
->
setChecked
(
false
);
...
...
src/ui/configuration/ApmHardwareConfig.h
View file @
897ee64f
...
...
@@ -48,6 +48,7 @@ This file is part of the QGROUNDCONTROL project
#include "OsdConfig.h"
#include "CameraGimbalConfig.h"
#include "AntennaTrackerConfig.h"
#include "ApmPlaneLevel.h"
class
ApmHardwareConfig
:
public
QWidget
{
...
...
@@ -70,6 +71,7 @@ private:
OsdConfig
*
osdConfig
;
CameraGimbalConfig
*
cameraGimbalConfig
;
AntennaTrackerConfig
*
antennaTrackerConfig
;
ApmPlaneLevel
*
planeLevel
;
private
slots
:
void
activeUASSet
(
UASInterface
*
uas
);
void
activateStackedWidget
();
...
...
src/ui/configuration/ApmHardwareConfig.ui
View file @
897ee64f
...
...
@@ -43,7 +43,7 @@
<x>
0
</x>
<y>
0
</y>
<width>
156
</width>
<height>
6
35
</height>
<height>
6
76
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_12"
>
...
...
@@ -129,6 +129,25 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"arduPlaneLevelButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
35
</height>
</size>
</property>
<property
name=
"layoutDirection"
>
<enum>
Qt::LeftToRight
</enum>
</property>
<property
name=
"autoFillBackground"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
ArduPlane Level
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"radioCalibrateButton"
>
<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