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
21090040
Commit
21090040
authored
Jun 11, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cal buttons needs to be in flickable
parent
d1c2f3fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
95 additions
and
87 deletions
+95
-87
SensorsComponent.qml
src/AutoPilotPlugins/PX4/SensorsComponent.qml
+95
-87
No files found.
src/AutoPilotPlugins/PX4/SensorsComponent.qml
View file @
21090040
...
...
@@ -106,8 +106,10 @@ SetupPage {
property
bool
showCompass1Rot
:
cal_mag1_id
.
value
>
0
&&
cal_mag1_rot
.
value
>=
0
property
bool
showCompass2Rot
:
cal_mag2_id
.
value
>
0
&&
cal_mag2_rot
.
value
>=
0
property
bool
_sensorsHaveFixedOrientation
:
QGroundControl
.
corePlugin
.
options
.
sensorsHaveFixedOrientation
property
bool
_wifiReliableForCalibration
:
QGroundControl
.
corePlugin
.
options
.
wifiReliableForCalibration
property
bool
_sensorsHaveFixedOrientation
:
QGroundControl
.
corePlugin
.
options
.
sensorsHaveFixedOrientation
property
bool
_wifiReliableForCalibration
:
QGroundControl
.
corePlugin
.
options
.
wifiReliableForCalibration
property
int
_buttonWidth
:
ScreenTools
.
defaultFontPixelWidth
*
15
SensorsComponentController
{
id
:
controller
...
...
@@ -332,107 +334,113 @@ SetupPage {
}
// QGCViewDialog
}
// Component - setOrientationsDialogComponent
Column
{
id
:
buttonColumn
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
readonly
property
int
buttonWidth
:
ScreenTools
.
defaultFontPixelWidth
*
15
IndicatorButton
{
id
:
compassButton
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
Compass
"
)
indicatorGreen
:
cal_mag0_id
.
value
!=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationCompass
onClicked
:
{
preCalibrationDialogType
=
"
compass
"
preCalibrationDialogHelp
=
compassHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Calibrate Compass
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
QGCFlickable
{
id
:
buttonFlickable
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
width
:
_buttonWidth
contentHeight
:
buttonColumn
.
height
+
buttonColumn
.
spacing
Column
{
id
:
buttonColumn
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
2
IndicatorButton
{
id
:
compassButton
width
:
_buttonWidth
text
:
qsTr
(
"
Compass
"
)
indicatorGreen
:
cal_mag0_id
.
value
!=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationCompass
onClicked
:
{
preCalibrationDialogType
=
"
compass
"
preCalibrationDialogHelp
=
compassHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Calibrate Compass
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
}
IndicatorButton
{
id
:
gyroButton
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
Gyroscope
"
)
indicatorGreen
:
cal_gyro0_id
.
value
!=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationGyro
onClicked
:
{
preCalibrationDialogType
=
"
gyro
"
preCalibrationDialogHelp
=
gyroHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Calibrate Gyro
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
IndicatorButton
{
id
:
gyroButton
width
:
_buttonWidth
text
:
qsTr
(
"
Gyroscope
"
)
indicatorGreen
:
cal_gyro0_id
.
value
!=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationGyro
onClicked
:
{
preCalibrationDialogType
=
"
gyro
"
preCalibrationDialogHelp
=
gyroHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Calibrate Gyro
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
}
IndicatorButton
{
id
:
accelButton
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
Accelerometer
"
)
indicatorGreen
:
cal_acc0_id
.
value
!=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationAccel
onClicked
:
{
preCalibrationDialogType
=
"
accel
"
preCalibrationDialogHelp
=
accelHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Calibrate Accelerometer
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
IndicatorButton
{
id
:
accelButton
width
:
_buttonWidth
text
:
qsTr
(
"
Accelerometer
"
)
indicatorGreen
:
cal_acc0_id
.
value
!=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationAccel
onClicked
:
{
preCalibrationDialogType
=
"
accel
"
preCalibrationDialogHelp
=
accelHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Calibrate Accelerometer
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
}
IndicatorButton
{
id
:
levelButton
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
Level Horizon
"
)
indicatorGreen
:
sens_board_x_off
.
value
!=
0
||
sens_board_y_off
!=
0
|
sens_board_z_off
!=
0
enabled
:
cal_acc0_id
.
value
!=
0
&&
cal_gyro0_id
.
value
!=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationLevel
onClicked
:
{
preCalibrationDialogType
=
"
level
"
preCalibrationDialogHelp
=
levelHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Level Horizon
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
IndicatorButton
{
id
:
levelButton
width
:
_buttonWidth
text
:
qsTr
(
"
Level Horizon
"
)
indicatorGreen
:
sens_board_x_off
.
value
!=
0
||
sens_board_y_off
!=
0
|
sens_board_z_off
!=
0
enabled
:
cal_acc0_id
.
value
!=
0
&&
cal_gyro0_id
.
value
!=
0
visible
:
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationLevel
onClicked
:
{
preCalibrationDialogType
=
"
level
"
preCalibrationDialogHelp
=
levelHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Level Horizon
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
}
IndicatorButton
{
id
:
airspeedButton
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
Airspeed
"
)
visible
:
(
controller
.
vehicle
.
fixedWing
||
controller
.
vehicle
.
vtol
)
&&
controller
.
getParameterFact
(
-
1
,
"
CBRK_AIRSPD_CHK
"
).
value
!=
162128
&&
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationAirspeed
indicatorGreen
:
sens_dpres_off
.
value
!=
0
onClicked
:
{
preCalibrationDialogType
=
"
airspeed
"
preCalibrationDialogHelp
=
airspeedHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Calibrate Airspeed
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
IndicatorButton
{
id
:
airspeedButton
width
:
_buttonWidth
text
:
qsTr
(
"
Airspeed
"
)
visible
:
(
controller
.
vehicle
.
fixedWing
||
controller
.
vehicle
.
vtol
)
&&
controller
.
getParameterFact
(
-
1
,
"
CBRK_AIRSPD_CHK
"
).
value
!=
162128
&&
QGroundControl
.
corePlugin
.
options
.
showSensorCalibrationAirspeed
indicatorGreen
:
sens_dpres_off
.
value
!=
0
onClicked
:
{
preCalibrationDialogType
=
"
airspeed
"
preCalibrationDialogHelp
=
airspeedHelp
showDialog
(
preCalibrationDialogComponent
,
qsTr
(
"
Calibrate Airspeed
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
}
}
QGCButton
{
id
:
cancelButton
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
Cancel
"
)
enabled
:
false
onClicked
:
controller
.
cancelCalibration
()
}
QGCButton
{
id
:
cancelButton
width
:
_
buttonWidth
text
:
qsTr
(
"
Cancel
"
)
enabled
:
false
onClicked
:
controller
.
cancelCalibration
()
}
QGCButton
{
id
:
setOrientationsButton
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
Set Orientations
"
)
visible
:
!
_sensorsHaveFixedOrientation
QGCButton
{
id
:
setOrientationsButton
width
:
_
buttonWidth
text
:
qsTr
(
"
Set Orientations
"
)
visible
:
!
_sensorsHaveFixedOrientation
onClicked
:
{
setOrientationsDialogShowBoardOrientation
=
true
showDialog
(
setOrientationsDialogComponent
,
qsTr
(
"
Set Orientations
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Ok
)
onClicked
:
{
setOrientationsDialogShowBoardOrientation
=
true
showDialog
(
setOrientationsDialogComponent
,
qsTr
(
"
Set Orientations
"
),
sensorsPage
.
showDialogDefaultWidth
,
StandardButton
.
Ok
)
}
}
}
}
//
Column
- Buttons
}
// Column - Buttons
}
//
QGCFLickable
- Buttons
Column
{
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.left
:
button
Column
.
right
anchors.left
:
button
Flickable
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
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