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
eba10f0c
Commit
eba10f0c
authored
May 10, 2017
by
Jacob Walser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pilot gain to sub firmware facts
parent
49e39513
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+6
-0
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+4
-0
SubmarineFact.json
src/Vehicle/SubmarineFact.json
+6
-0
No files found.
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
eba10f0c
...
...
@@ -173,6 +173,8 @@ void ArduSubFirmwarePlugin::_handleNamedValueFloat(mavlink_message_t* message)
fwFactGroup
->
getFact
(
"lights 1"
)
->
setRawValue
(
value
.
value
*
100
);
}
else
if
(
name
==
"Lights2"
)
{
fwFactGroup
->
getFact
(
"lights 2"
)
->
setRawValue
(
value
.
value
*
100
);
}
else
if
(
name
==
"PilotGain"
)
{
fwFactGroup
->
getFact
(
"pilot gain"
)
->
setRawValue
(
value
.
value
*
100
);
}
}
...
...
@@ -194,6 +196,7 @@ const char* APMSubmarineFactGroup::_camTiltFactName = "camera tilt";
const
char
*
APMSubmarineFactGroup
::
_tetherTurnsFactName
=
"tether turns"
;
const
char
*
APMSubmarineFactGroup
::
_lightsLevel1FactName
=
"lights 1"
;
const
char
*
APMSubmarineFactGroup
::
_lightsLevel2FactName
=
"lights 2"
;
const
char
*
APMSubmarineFactGroup
::
_pilotGainFactName
=
"pilot gain"
;
APMSubmarineFactGroup
::
APMSubmarineFactGroup
(
QObject
*
parent
)
:
FactGroup
(
300
,
":/json/Vehicle/SubmarineFact.json"
,
parent
)
...
...
@@ -201,15 +204,18 @@ APMSubmarineFactGroup::APMSubmarineFactGroup(QObject* parent)
,
_tetherTurnsFact
(
0
,
_tetherTurnsFactName
,
FactMetaData
::
valueTypeDouble
)
,
_lightsLevel1Fact
(
0
,
_lightsLevel1FactName
,
FactMetaData
::
valueTypeDouble
)
,
_lightsLevel2Fact
(
0
,
_lightsLevel2FactName
,
FactMetaData
::
valueTypeDouble
)
,
_pilotGainFact
(
0
,
_pilotGainFactName
,
FactMetaData
::
valueTypeDouble
)
{
_addFact
(
&
_camTiltFact
,
_camTiltFactName
);
_addFact
(
&
_tetherTurnsFact
,
_tetherTurnsFactName
);
_addFact
(
&
_lightsLevel1Fact
,
_lightsLevel1FactName
);
_addFact
(
&
_lightsLevel2Fact
,
_lightsLevel2FactName
);
_addFact
(
&
_pilotGainFact
,
_pilotGainFactName
);
// Start out as not available "--.--"
_camTiltFact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_tetherTurnsFact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_lightsLevel1Fact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_lightsLevel2Fact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_pilotGainFact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
}
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
eba10f0c
...
...
@@ -110,16 +110,19 @@ public:
Q_PROPERTY
(
Fact
*
tetherTurns
READ
tetherTurns
CONSTANT
)
Q_PROPERTY
(
Fact
*
lightsLevel1
READ
lightsLevel1
CONSTANT
)
Q_PROPERTY
(
Fact
*
lightsLevel2
READ
lightsLevel2
CONSTANT
)
Q_PROPERTY
(
Fact
*
pilotGain
READ
pilotGain
CONSTANT
)
Fact
*
camTilt
(
void
)
{
return
&
_camTiltFact
;
}
Fact
*
tetherTurns
(
void
)
{
return
&
_tetherTurnsFact
;
}
Fact
*
lightsLevel1
(
void
)
{
return
&
_lightsLevel1Fact
;
}
Fact
*
lightsLevel2
(
void
)
{
return
&
_lightsLevel2Fact
;
}
Fact
*
pilotGain
(
void
)
{
return
&
_pilotGainFact
;
}
static
const
char
*
_camTiltFactName
;
static
const
char
*
_tetherTurnsFactName
;
static
const
char
*
_lightsLevel1FactName
;
static
const
char
*
_lightsLevel2FactName
;
static
const
char
*
_pilotGainFactName
;
static
const
char
*
_settingsGroup
;
...
...
@@ -128,5 +131,6 @@ private:
Fact
_tetherTurnsFact
;
Fact
_lightsLevel1Fact
;
Fact
_lightsLevel2Fact
;
Fact
_pilotGainFact
;
};
#endif
src/Vehicle/SubmarineFact.json
View file @
eba10f0c
...
...
@@ -22,5 +22,11 @@
"shortDescription"
:
"Lights 2 level"
,
"type"
:
"int16"
,
"units"
:
"%"
},
{
"name"
:
"pilot gain"
,
"shortDescription"
:
"Pilot Gain"
,
"type"
:
"int16"
,
"units"
:
"%"
}
]
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