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
29e3c496
Commit
29e3c496
authored
Feb 23, 2017
by
Jacob Walser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable CompassMot for Sub
parent
c62e1fbb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
1 deletion
+28
-1
APMSensorsComponent.qml
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
+4
-0
ArduSubFirmwarePlugin.cc
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
+5
-0
ArduSubFirmwarePlugin.h
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
+2
-0
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+5
-0
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+4
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+5
-0
Vehicle.h
src/Vehicle/Vehicle.h
+3
-1
No files found.
src/AutoPilotPlugins/APM/APMSensorsComponent.qml
View file @
29e3c496
...
...
@@ -532,6 +532,10 @@ SetupPage {
id
:
motorInterferenceButton
width
:
parent
.
buttonWidth
text
:
qsTr
(
"
CompassMot
"
)
visible
:
_activeVehicle
?
_activeVehicle
.
supportsMotorInterference
:
false
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
onClicked
:
showDialog
(
compassMotDialogComponent
,
qsTr
(
"
CompassMot - Compass Motor Interference Calibration
"
),
qgcView
.
showDialogFullWidth
,
StandardButton
.
Cancel
|
StandardButton
.
Ok
)
}
...
...
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.cc
View file @
29e3c496
...
...
@@ -101,3 +101,8 @@ bool ArduSubFirmwarePlugin::supportsCalibratePressure(void)
{
return
true
;
}
bool
ArduSubFirmwarePlugin
::
supportsMotorInterference
(
void
)
{
return
false
;
}
src/FirmwarePlugin/APM/ArduSubFirmwarePlugin.h
View file @
29e3c496
...
...
@@ -81,6 +81,8 @@ public:
bool
supportsCalibratePressure
(
void
);
bool
supportsMotorInterference
(
void
);
QString
brandImage
(
const
Vehicle
*
vehicle
)
const
{
Q_UNUSED
(
vehicle
);
return
QStringLiteral
(
"/qmlimages/APM/BrandImageSub"
);
}
const
FirmwarePlugin
::
remapParamNameMajorVersionMap_t
&
paramNameRemapMajorVersionMap
(
void
)
const
final
{
return
_remapParamName
;
}
int
remapParamNameHigestMinorVersionNumber
(
int
majorVersionNumber
)
const
final
;
...
...
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
29e3c496
...
...
@@ -139,6 +139,11 @@ bool FirmwarePlugin::supportsCalibratePressure(void)
return
false
;
}
bool
FirmwarePlugin
::
supportsMotorInterference
(
void
)
{
return
true
;
}
bool
FirmwarePlugin
::
supportsJSButton
(
void
)
{
return
false
;
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
29e3c496
...
...
@@ -167,6 +167,10 @@ public:
/// zero at the current pressure. Default is false.
virtual
bool
supportsCalibratePressure
(
void
);
/// Returns true if the firmware supports calibrating motor interference offsets for the compass
/// (CompassMot). Default is true.
virtual
bool
supportsMotorInterference
(
void
);
/// Called before any mavlink message is processed by Vehicle such that the firmwre plugin
/// can adjust any message characteristics. This is handy to adjust or differences in mavlink
/// spec implementations such that the base code can remain mavlink generic.
...
...
src/Vehicle/Vehicle.cc
View file @
29e3c496
...
...
@@ -1777,6 +1777,11 @@ bool Vehicle::supportsCalibratePressure(void) const
return
_firmwarePlugin
->
supportsCalibratePressure
();
}
bool
Vehicle
::
supportsMotorInterference
(
void
)
const
{
return
_firmwarePlugin
->
supportsMotorInterference
();
}
void
Vehicle
::
_setCoordinateValid
(
bool
coordinateValid
)
{
if
(
coordinateValid
!=
_coordinateValid
)
{
...
...
src/Vehicle/Vehicle.h
View file @
29e3c496
...
...
@@ -282,7 +282,8 @@ public:
Q_PROPERTY
(
bool
supportsThrottleModeCenterZero
READ
supportsThrottleModeCenterZero
CONSTANT
)
Q_PROPERTY
(
bool
supportsJSButton
READ
supportsJSButton
CONSTANT
)
Q_PROPERTY
(
bool
supportsRadio
READ
supportsRadio
CONSTANT
)
Q_PROPERTY
(
bool
supportsCalibratePressure
READ
supportsCalibratePressure
CONSTANT
)
Q_PROPERTY
(
bool
supportsCalibratePressure
READ
supportsCalibratePressure
CONSTANT
)
Q_PROPERTY
(
bool
supportsMotorInterference
READ
supportsMotorInterference
CONSTANT
)
Q_PROPERTY
(
bool
autoDisconnect
MEMBER
_autoDisconnect
NOTIFY
autoDisconnectChanged
)
Q_PROPERTY
(
QString
prearmError
READ
prearmError
WRITE
setPrearmError
NOTIFY
prearmErrorChanged
)
Q_PROPERTY
(
int
motorCount
READ
motorCount
CONSTANT
)
...
...
@@ -506,6 +507,7 @@ public:
bool
supportsRadio
(
void
)
const
;
bool
supportsJSButton
(
void
)
const
;
bool
supportsCalibratePressure
(
void
)
const
;
bool
supportsMotorInterference
(
void
)
const
;
void
setFlying
(
bool
flying
);
void
setGuidedMode
(
bool
guidedMode
);
...
...
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