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
696f9e32
Commit
696f9e32
authored
Apr 25, 2016
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3272 from mavlink/px4param
PX4 Param System Update
parents
fb57f430
9acfdc54
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
10 deletions
+65
-10
SafetyComponent.qml
src/AutoPilotPlugins/PX4/SafetyComponent.qml
+14
-1
FactMetaData.cc
src/FactSystem/FactMetaData.cc
+11
-0
FactMetaData.h
src/FactSystem/FactMetaData.h
+2
-0
PX4ParameterFactMetaData.xml
src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
+38
-9
No files found.
src/AutoPilotPlugins/PX4/SafetyComponent.qml
View file @
696f9e32
...
...
@@ -117,7 +117,7 @@ QGCView {
QGCLabel
{
anchors.baseline
:
batLowLevelField
.
baseline
width
:
_middleRowWidth
text
:
qsTr
(
"
Battery
Low
Level:
"
)
text
:
qsTr
(
"
Battery
Warn
Level:
"
)
}
FactTextField
{
id
:
batLowLevelField
...
...
@@ -126,6 +126,19 @@ QGCView {
width
:
_editFieldWidth
}
}
Row
{
QGCLabel
{
anchors.baseline
:
batLowLevelField
.
baseline
width
:
_middleRowWidth
text
:
qsTr
(
"
Battery Failsafe Level:
"
)
}
FactTextField
{
id
:
batCritLevelField
fact
:
controller
.
getParameterFact
(
-
1
,
"
BAT_CRIT_THR
"
)
showUnits
:
true
width
:
_editFieldWidth
}
}
}
}
}
...
...
src/FactSystem/FactMetaData.cc
View file @
696f9e32
...
...
@@ -38,6 +38,7 @@
const
FactMetaData
::
BuiltInTranslation_s
FactMetaData
::
_rgBuiltInTranslations
[]
=
{
{
"centi-degrees"
,
"degrees"
,
FactMetaData
::
_centiDegreesToDegrees
,
FactMetaData
::
_degreesToCentiDegrees
},
{
"radians"
,
"degrees"
,
FactMetaData
::
_radiansToDegrees
,
FactMetaData
::
_degreesToRadians
},
{
"norm"
,
"%"
,
FactMetaData
::
_normToPercent
,
FactMetaData
::
_percentToNorm
},
};
// Translations driven by app settings
...
...
@@ -449,6 +450,16 @@ QVariant FactMetaData::_knotsToMetersPerSecond(const QVariant& knots)
return
QVariant
(
knots
.
toDouble
()
*
0.51444444444
);
}
QVariant
FactMetaData
::
_percentToNorm
(
const
QVariant
&
percent
)
{
return
QVariant
(
percent
.
toDouble
()
/
100.0
);
}
QVariant
FactMetaData
::
_normToPercent
(
const
QVariant
&
normalized
)
{
return
QVariant
(
normalized
.
toDouble
()
*
100.0
);
}
void
FactMetaData
::
setRawUnits
(
const
QString
&
rawUnits
)
{
_rawUnits
=
rawUnits
;
...
...
src/FactSystem/FactMetaData.h
View file @
696f9e32
...
...
@@ -163,6 +163,8 @@ private:
static
QVariant
_kilometersPerHourToMetersPerSecond
(
const
QVariant
&
kilometersPerHour
);
static
QVariant
_metersPerSecondToKnots
(
const
QVariant
&
metersPerSecond
);
static
QVariant
_knotsToMetersPerSecond
(
const
QVariant
&
knots
);
static
QVariant
_percentToNorm
(
const
QVariant
&
percent
);
static
QVariant
_normToPercent
(
const
QVariant
&
normalized
);
struct
AppSettingsTranslation_s
{
const
char
*
rawUnits
;
...
...
src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
View file @
696f9e32
This diff is collapsed.
Click to expand it.
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