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
b0a3f600
Unverified
Commit
b0a3f600
authored
Dec 11, 2019
by
Don Gagne
Committed by
GitHub
Dec 11, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8104 from DonLakeFlyer/RandomFixes
Random fixes
parents
6a1344a4
1e0f27a4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
32 deletions
+35
-32
Fact.cc
src/FactSystem/Fact.cc
+1
-1
FactMetaData.cc
src/FactSystem/FactMetaData.cc
+18
-17
FactMetaData.h
src/FactSystem/FactMetaData.h
+2
-2
MavCmdInfoCommon.json
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
+7
-5
MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoCommon.json
+1
-1
MissionCommandUIInfo.cc
src/MissionManager/MissionCommandUIInfo.cc
+1
-1
MissionItemEditor.qml
src/PlanView/MissionItemEditor.qml
+2
-1
PlanView.qml
src/PlanView/PlanView.qml
+2
-3
App.SettingsGroup.json
src/Settings/App.SettingsGroup.json
+1
-1
No files found.
src/FactSystem/Fact.cc
View file @
b0a3f600
...
...
@@ -519,7 +519,7 @@ int Fact::decimalPlaces(void) const
return
_metaData
->
decimalPlaces
();
}
else
{
qWarning
()
<<
kMissingMetadata
<<
name
();
return
FactMetaData
::
d
efaultDecimalPlaces
;
return
FactMetaData
::
kD
efaultDecimalPlaces
;
}
}
...
...
src/FactSystem/FactMetaData.cc
View file @
b0a3f600
...
...
@@ -88,7 +88,7 @@ const char* FactMetaData::_qgcRebootRequiredJsonKey = "qgcRebootRequired";
FactMetaData
::
FactMetaData
(
QObject
*
parent
)
:
QObject
(
parent
)
,
_type
(
valueTypeInt32
)
,
_decimalPlaces
(
u
nknownDecimalPlaces
)
,
_decimalPlaces
(
kU
nknownDecimalPlaces
)
,
_rawDefaultValue
(
0
)
,
_defaultValueAvailable
(
false
)
,
_rawMax
(
_maxForType
())
...
...
@@ -112,7 +112,7 @@ FactMetaData::FactMetaData(QObject* parent)
FactMetaData
::
FactMetaData
(
ValueType_t
type
,
QObject
*
parent
)
:
QObject
(
parent
)
,
_type
(
type
)
,
_decimalPlaces
(
u
nknownDecimalPlaces
)
,
_decimalPlaces
(
kU
nknownDecimalPlaces
)
,
_rawDefaultValue
(
0
)
,
_defaultValueAvailable
(
false
)
,
_rawMax
(
_maxForType
())
...
...
@@ -142,7 +142,7 @@ FactMetaData::FactMetaData(const FactMetaData& other, QObject* parent)
FactMetaData
::
FactMetaData
(
ValueType_t
type
,
const
QString
name
,
QObject
*
parent
)
:
QObject
(
parent
)
,
_type
(
type
)
,
_decimalPlaces
(
u
nknownDecimalPlaces
)
,
_decimalPlaces
(
kU
nknownDecimalPlaces
)
,
_rawDefaultValue
(
0
)
,
_defaultValueAvailable
(
false
)
,
_rawMax
(
_maxForType
())
...
...
@@ -1023,8 +1023,8 @@ double FactMetaData::cookedIncrement(void) const
int
FactMetaData
::
decimalPlaces
(
void
)
const
{
int
actualDecimalPlaces
=
d
efaultDecimalPlaces
;
int
incrementDecimalPlaces
=
u
nknownDecimalPlaces
;
int
actualDecimalPlaces
=
kD
efaultDecimalPlaces
;
int
incrementDecimalPlaces
=
kU
nknownDecimalPlaces
;
// First determine decimal places from increment
double
increment
=
_rawTranslator
(
this
->
rawIncrement
()).
toDouble
();
...
...
@@ -1041,20 +1041,21 @@ int FactMetaData::decimalPlaces(void) const
}
}
// Correct decimal places is the larger of the two, increment or meta data value
if
(
incrementDecimalPlaces
!=
unknownDecimalPlaces
&&
_decimalPlaces
==
u
nknownDecimalPlaces
)
{
if
(
_decimalPlaces
==
kUnknownDecimalPlaces
)
{
if
(
incrementDecimalPlaces
!=
kU
nknownDecimalPlaces
)
{
actualDecimalPlaces
=
incrementDecimalPlaces
;
}
else
{
// Adjust decimal places for cooked translation
int
settingsDecimalPlaces
=
_decimalPlaces
==
unknownDecimalPlaces
?
d
efaultDecimalPlaces
:
_decimalPlaces
;
int
settingsDecimalPlaces
=
_decimalPlaces
==
kUnknownDecimalPlaces
?
kD
efaultDecimalPlaces
:
_decimalPlaces
;
double
ctest
=
_rawTranslator
(
1.0
).
toDouble
();
settingsDecimalPlaces
+=
-
log10
(
ctest
);
settingsDecimalPlaces
=
qMin
(
25
,
settingsDecimalPlaces
);
settingsDecimalPlaces
=
qMax
(
0
,
settingsDecimalPlaces
);
actualDecimalPlaces
=
qMax
(
settingsDecimalPlaces
,
incrementDecimalPlaces
);
}
}
else
{
actualDecimalPlaces
=
_decimalPlaces
;
}
return
actualDecimalPlaces
;
...
...
src/FactSystem/FactMetaData.h
View file @
b0a3f600
...
...
@@ -166,8 +166,8 @@ public:
/// @returns false: Convertion failed
bool
clampValue
(
const
QVariant
&
cookedValue
,
QVariant
&
typedValue
);
static
const
int
d
efaultDecimalPlaces
=
3
;
///< Default value for decimal places if not specified/known
static
const
int
u
nknownDecimalPlaces
=
-
1
;
///< Number of decimal places to specify is not known
static
const
int
kD
efaultDecimalPlaces
=
3
;
///< Default value for decimal places if not specified/known
static
const
int
kU
nknownDecimalPlaces
=
-
1
;
///< Number of decimal places to specify is not known
static
ValueType_t
stringToType
(
const
QString
&
typeString
,
bool
&
unknownType
);
static
size_t
typeToSize
(
ValueType_t
type
);
...
...
src/FirmwarePlugin/APM/MavCmdInfoCommon.json
View file @
b0a3f600
...
...
@@ -49,7 +49,9 @@
{
"id"
:
84
,
"comment"
:
"MAV_CMD_NAV_VTOL_TAKEOFF"
,
"specifiesCoordinate"
:
true
,
"description"
:
"Takeoff to specified altitude."
,
"specifiesCoordinate"
:
false
,
"specifiesAltitudeOnly"
:
true
,
"friendlyEdit"
:
true
,
"category"
:
"VTOL"
},
...
...
src/MissionManager/MavCmdInfoCommon.json
View file @
b0a3f600
...
...
@@ -286,7 +286,7 @@
{
"id"
:
84
,
"rawName"
:
"MAV_CMD_NAV_VTOL_TAKEOFF"
,
"friendlyName"
:
"VTOL takeoff
and transition
"
,
"friendlyName"
:
"VTOL takeoff"
,
"description"
:
"Takeoff in VTOL mode, transition to forward flight and fly to the specified location."
,
"specifiesCoordinate"
:
true
,
"friendlyEdit"
:
true
,
...
...
src/MissionManager/MissionCommandUIInfo.cc
View file @
b0a3f600
...
...
@@ -351,7 +351,7 @@ bool MissionCommandUIInfo::loadJsonInfo(const QJsonObject& jsonObject, bool requ
MissionCmdParamInfo
*
paramInfo
=
new
MissionCmdParamInfo
(
this
);
paramInfo
->
_label
=
paramObject
.
value
(
_labelJsonKey
).
toString
();
paramInfo
->
_decimalPlaces
=
paramObject
.
value
(
_decimalPlacesJsonKey
).
toInt
(
FactMetaData
::
u
nknownDecimalPlaces
);
paramInfo
->
_decimalPlaces
=
paramObject
.
value
(
_decimalPlacesJsonKey
).
toInt
(
FactMetaData
::
kU
nknownDecimalPlaces
);
paramInfo
->
_enumStrings
=
paramObject
.
value
(
_enumStringsJsonKey
).
toString
().
split
(
","
,
QString
::
SkipEmptyParts
);
paramInfo
->
_param
=
i
;
paramInfo
->
_units
=
paramObject
.
value
(
_unitsJsonKey
).
toString
();
...
...
src/PlanView/MissionItemEditor.qml
View file @
b0a3f600
...
...
@@ -242,7 +242,8 @@ Rectangle {
MissionCommandDialog
{
missionItem
:
_root
.
missionItem
map
:
_root
.
map
flyThroughCommandsAllowed
:
_missionController
.
flyThroughCommandsAllowed
// FIXME: Disabling fly through commands doesn't work since you may need to change from an RTL to something else
flyThroughCommandsAllowed
:
true
//_missionController.flyThroughCommandsAllowed
}
}
...
...
src/PlanView/PlanView.qml
View file @
b0a3f600
...
...
@@ -941,10 +941,9 @@ Item {
anchors.left
:
parent
.
left
mapControl
:
editorMap
buttonsOnLeft
:
true
terrainButtonVisible
:
true
visible
:
_toolStripBottom
<
y
&&
_editingLayer
===
_layerMission
terrainButtonVisible
:
_editingLayer
===
_layerMission
visible
:
_toolStripBottom
<
y
terrainButtonChecked
:
waypointValuesDisplay
.
visible
onTerrainButtonClicked
:
waypointValuesDisplay
.
toggleVisible
()
}
...
...
src/Settings/App.SettingsGroup.json
View file @
b0a3f600
...
...
@@ -12,7 +12,7 @@
"shortDescription"
:
"Offline editing vehicle type"
,
"type"
:
"uint32"
,
"enumStrings"
:
"Fixed Wing,Multi-Rotor,VTOL,Rover,Sub"
,
"enumValues"
:
"1,2,
19
,10,12"
,
"enumValues"
:
"1,2,
20
,10,12"
,
"defaultValue"
:
2
},
{
...
...
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