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
ef1627ce
Commit
ef1627ce
authored
Jul 26, 2017
by
dheideman
Committed by
Jacob Walser
Dec 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add input hold to sub firmware facts
parent
4ed2e7e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-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
+5
-0
No files found.
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
ef1627ce
...
@@ -210,6 +210,8 @@ void ArduSubFirmwarePlugin::_handleNamedValueFloat(mavlink_message_t* message)
...
@@ -210,6 +210,8 @@ void ArduSubFirmwarePlugin::_handleNamedValueFloat(mavlink_message_t* message)
_infoFactGroup
.
getFact
(
"lights 2"
)
->
setRawValue
(
value
.
value
*
100
);
_infoFactGroup
.
getFact
(
"lights 2"
)
->
setRawValue
(
value
.
value
*
100
);
}
else
if
(
name
==
"PilotGain"
)
{
}
else
if
(
name
==
"PilotGain"
)
{
_infoFactGroup
.
getFact
(
"pilot gain"
)
->
setRawValue
(
value
.
value
*
100
);
_infoFactGroup
.
getFact
(
"pilot gain"
)
->
setRawValue
(
value
.
value
*
100
);
}
else
if
(
name
==
"InputHold"
)
{
_infoFactGroup
.
getFact
(
"input hold"
)
->
setRawValue
(
value
.
value
);
}
}
}
}
...
@@ -236,6 +238,7 @@ const char* APMSubmarineFactGroup::_tetherTurnsFactName = "tether turns";
...
@@ -236,6 +238,7 @@ const char* APMSubmarineFactGroup::_tetherTurnsFactName = "tether turns";
const
char
*
APMSubmarineFactGroup
::
_lightsLevel1FactName
=
"lights 1"
;
const
char
*
APMSubmarineFactGroup
::
_lightsLevel1FactName
=
"lights 1"
;
const
char
*
APMSubmarineFactGroup
::
_lightsLevel2FactName
=
"lights 2"
;
const
char
*
APMSubmarineFactGroup
::
_lightsLevel2FactName
=
"lights 2"
;
const
char
*
APMSubmarineFactGroup
::
_pilotGainFactName
=
"pilot gain"
;
const
char
*
APMSubmarineFactGroup
::
_pilotGainFactName
=
"pilot gain"
;
const
char
*
APMSubmarineFactGroup
::
_inputHoldFactName
=
"input hold"
;
APMSubmarineFactGroup
::
APMSubmarineFactGroup
(
QObject
*
parent
)
APMSubmarineFactGroup
::
APMSubmarineFactGroup
(
QObject
*
parent
)
:
FactGroup
(
300
,
":/json/Vehicle/SubmarineFact.json"
,
parent
)
:
FactGroup
(
300
,
":/json/Vehicle/SubmarineFact.json"
,
parent
)
...
@@ -244,12 +247,14 @@ APMSubmarineFactGroup::APMSubmarineFactGroup(QObject* parent)
...
@@ -244,12 +247,14 @@ APMSubmarineFactGroup::APMSubmarineFactGroup(QObject* parent)
,
_lightsLevel1Fact
(
0
,
_lightsLevel1FactName
,
FactMetaData
::
valueTypeDouble
)
,
_lightsLevel1Fact
(
0
,
_lightsLevel1FactName
,
FactMetaData
::
valueTypeDouble
)
,
_lightsLevel2Fact
(
0
,
_lightsLevel2FactName
,
FactMetaData
::
valueTypeDouble
)
,
_lightsLevel2Fact
(
0
,
_lightsLevel2FactName
,
FactMetaData
::
valueTypeDouble
)
,
_pilotGainFact
(
0
,
_pilotGainFactName
,
FactMetaData
::
valueTypeDouble
)
,
_pilotGainFact
(
0
,
_pilotGainFactName
,
FactMetaData
::
valueTypeDouble
)
,
_inputHoldFact
(
0
,
_inputHoldFactName
,
FactMetaData
::
valueTypeDouble
)
{
{
_addFact
(
&
_camTiltFact
,
_camTiltFactName
);
_addFact
(
&
_camTiltFact
,
_camTiltFactName
);
_addFact
(
&
_tetherTurnsFact
,
_tetherTurnsFactName
);
_addFact
(
&
_tetherTurnsFact
,
_tetherTurnsFactName
);
_addFact
(
&
_lightsLevel1Fact
,
_lightsLevel1FactName
);
_addFact
(
&
_lightsLevel1Fact
,
_lightsLevel1FactName
);
_addFact
(
&
_lightsLevel2Fact
,
_lightsLevel2FactName
);
_addFact
(
&
_lightsLevel2Fact
,
_lightsLevel2FactName
);
_addFact
(
&
_pilotGainFact
,
_pilotGainFactName
);
_addFact
(
&
_pilotGainFact
,
_pilotGainFactName
);
_addFact
(
&
_inputHoldFact
,
_inputHoldFactName
);
// Start out as not available "--.--"
// Start out as not available "--.--"
_camTiltFact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_camTiltFact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
...
@@ -257,6 +262,7 @@ APMSubmarineFactGroup::APMSubmarineFactGroup(QObject* parent)
...
@@ -257,6 +262,7 @@ APMSubmarineFactGroup::APMSubmarineFactGroup(QObject* parent)
_lightsLevel1Fact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_lightsLevel1Fact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_lightsLevel2Fact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_lightsLevel2Fact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_pilotGainFact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_pilotGainFact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
_inputHoldFact
.
setRawValue
(
std
::
numeric_limits
<
float
>::
quiet_NaN
());
}
}
QString
ArduSubFirmwarePlugin
::
vehicleImageOpaque
(
const
Vehicle
*
vehicle
)
const
QString
ArduSubFirmwarePlugin
::
vehicleImageOpaque
(
const
Vehicle
*
vehicle
)
const
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
ef1627ce
...
@@ -40,18 +40,21 @@ public:
...
@@ -40,18 +40,21 @@ public:
Q_PROPERTY
(
Fact
*
lightsLevel1
READ
lightsLevel1
CONSTANT
)
Q_PROPERTY
(
Fact
*
lightsLevel1
READ
lightsLevel1
CONSTANT
)
Q_PROPERTY
(
Fact
*
lightsLevel2
READ
lightsLevel2
CONSTANT
)
Q_PROPERTY
(
Fact
*
lightsLevel2
READ
lightsLevel2
CONSTANT
)
Q_PROPERTY
(
Fact
*
pilotGain
READ
pilotGain
CONSTANT
)
Q_PROPERTY
(
Fact
*
pilotGain
READ
pilotGain
CONSTANT
)
Q_PROPERTY
(
Fact
*
inputHold
READ
inputHold
CONSTANT
)
Fact
*
camTilt
(
void
)
{
return
&
_camTiltFact
;
}
Fact
*
camTilt
(
void
)
{
return
&
_camTiltFact
;
}
Fact
*
tetherTurns
(
void
)
{
return
&
_tetherTurnsFact
;
}
Fact
*
tetherTurns
(
void
)
{
return
&
_tetherTurnsFact
;
}
Fact
*
lightsLevel1
(
void
)
{
return
&
_lightsLevel1Fact
;
}
Fact
*
lightsLevel1
(
void
)
{
return
&
_lightsLevel1Fact
;
}
Fact
*
lightsLevel2
(
void
)
{
return
&
_lightsLevel2Fact
;
}
Fact
*
lightsLevel2
(
void
)
{
return
&
_lightsLevel2Fact
;
}
Fact
*
pilotGain
(
void
)
{
return
&
_pilotGainFact
;
}
Fact
*
pilotGain
(
void
)
{
return
&
_pilotGainFact
;
}
Fact
*
inputHold
(
void
)
{
return
&
_inputHoldFact
;
}
static
const
char
*
_camTiltFactName
;
static
const
char
*
_camTiltFactName
;
static
const
char
*
_tetherTurnsFactName
;
static
const
char
*
_tetherTurnsFactName
;
static
const
char
*
_lightsLevel1FactName
;
static
const
char
*
_lightsLevel1FactName
;
static
const
char
*
_lightsLevel2FactName
;
static
const
char
*
_lightsLevel2FactName
;
static
const
char
*
_pilotGainFactName
;
static
const
char
*
_pilotGainFactName
;
static
const
char
*
_inputHoldFactName
;
static
const
char
*
_settingsGroup
;
static
const
char
*
_settingsGroup
;
...
@@ -61,6 +64,7 @@ private:
...
@@ -61,6 +64,7 @@ private:
Fact
_lightsLevel1Fact
;
Fact
_lightsLevel1Fact
;
Fact
_lightsLevel2Fact
;
Fact
_lightsLevel2Fact
;
Fact
_pilotGainFact
;
Fact
_pilotGainFact
;
Fact
_inputHoldFact
;
};
};
class
APMSubMode
:
public
APMCustomMode
class
APMSubMode
:
public
APMCustomMode
...
...
src/Vehicle/SubmarineFact.json
View file @
ef1627ce
...
@@ -28,5 +28,10 @@
...
@@ -28,5 +28,10 @@
"shortDescription"
:
"Pilot Gain"
,
"shortDescription"
:
"Pilot Gain"
,
"type"
:
"int16"
,
"type"
:
"int16"
,
"units"
:
"%"
"units"
:
"%"
},
{
"name"
:
"input hold"
,
"shortDescription"
:
"Input Hold"
,
"type"
:
"int16"
}
}
]
]
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