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
72f342d7
Commit
72f342d7
authored
Jun 14, 2020
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
d5078aeb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
APMFirmwarePlugin.cc
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
+5
-5
APMFirmwarePlugin.h
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
+4
-2
FirmwarePlugin.cc
src/FirmwarePlugin/FirmwarePlugin.cc
+1
-4
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+4
-1
No files found.
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
View file @
72f342d7
...
...
@@ -289,10 +289,8 @@ void APMFirmwarePlugin::_handleIncomingParamValue(Vehicle* vehicle, mavlink_mess
&
paramValue
);
}
void
APMFirmwarePlugin
::
_handleOutgoingParamSet
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
void
APMFirmwarePlugin
::
_handleOutgoingParamSet
ThreadSafe
(
Vehicle
*
/*vehicle*/
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
{
Q_UNUSED
(
vehicle
);
mavlink_param_set_t
paramSet
;
mavlink_param_union_t
paramUnion
;
...
...
@@ -336,7 +334,9 @@ void APMFirmwarePlugin::_handleOutgoingParamSet(Vehicle* vehicle, LinkInterface*
qCCritical
(
APMFirmwarePluginLog
)
<<
"Invalid/Unsupported data type used in parameter:"
<<
paramSet
.
param_type
;
}
_adjustOutgoingMavlinkMutex
.
lock
();
mavlink_msg_param_set_encode_chan
(
message
->
sysid
,
message
->
compid
,
outgoingLink
->
mavlinkChannel
(),
message
,
&
paramSet
);
_adjustOutgoingMavlinkMutex
.
unlock
();
}
bool
APMFirmwarePlugin
::
_handleIncomingStatusText
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
...
...
@@ -508,11 +508,11 @@ bool APMFirmwarePlugin::adjustIncomingMavlinkMessage(Vehicle* vehicle, mavlink_m
return
true
;
}
void
APMFirmwarePlugin
::
adjustOutgoingMavlinkMessage
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
void
APMFirmwarePlugin
::
adjustOutgoingMavlinkMessage
ThreadSafe
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
{
switch
(
message
->
msgid
)
{
case
MAVLINK_MSG_ID_PARAM_SET
:
_handleOutgoingParamSet
(
vehicle
,
outgoingLink
,
message
);
_handleOutgoingParamSet
ThreadSafe
(
vehicle
,
outgoingLink
,
message
);
break
;
}
}
...
...
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
View file @
72f342d7
...
...
@@ -93,7 +93,7 @@ public:
void
guidedModeRTL
(
Vehicle
*
vehicle
,
bool
smartRTL
)
override
;
void
guidedModeChangeAltitude
(
Vehicle
*
vehicle
,
double
altitudeChange
)
override
;
bool
adjustIncomingMavlinkMessage
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
)
override
;
void
adjustOutgoingMavlinkMessage
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
override
;
void
adjustOutgoingMavlinkMessage
ThreadSafe
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
override
;
virtual
void
initializeStreamRates
(
Vehicle
*
vehicle
);
void
initializeVehicle
(
Vehicle
*
vehicle
)
override
;
bool
sendHomePositionToVehicle
(
void
)
override
;
...
...
@@ -127,7 +127,7 @@ private:
void
_handleIncomingParamValue
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
);
bool
_handleIncomingStatusText
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
);
void
_handleIncomingHeartbeat
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
);
void
_handleOutgoingParamSet
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
);
void
_handleOutgoingParamSet
ThreadSafe
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
);
void
_soloVideoHandshake
(
Vehicle
*
vehicle
,
bool
originalSoloFirmware
);
bool
_guidedModeTakeoff
(
Vehicle
*
vehicle
,
double
altitudeRel
);
void
_handleRCChannels
(
Vehicle
*
vehicle
,
mavlink_message_t
*
message
);
...
...
@@ -141,6 +141,8 @@ private:
QList
<
APMCustomMode
>
_supportedModes
;
QMap
<
int
/* vehicle id */
,
QMap
<
int
/* componentId */
,
bool
/* true: component is part of ArduPilot stack */
>>
_ardupilotComponentMap
;
QMutex
_adjustOutgoingMavlinkMutex
;
static
const
char
*
_artooIP
;
static
const
int
_artooVideoHandshakePort
;
};
...
...
src/FirmwarePlugin/FirmwarePlugin.cc
View file @
72f342d7
...
...
@@ -156,11 +156,8 @@ bool FirmwarePlugin::adjustIncomingMavlinkMessage(Vehicle* vehicle, mavlink_mess
return
true
;
}
void
FirmwarePlugin
::
adjustOutgoingMavlinkMessage
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
)
void
FirmwarePlugin
::
adjustOutgoingMavlinkMessage
ThreadSafe
(
Vehicle
*
/*vehicle*/
,
LinkInterface
*
/*outgoingLink*/
,
mavlink_message_t
*
/*message*/
)
{
Q_UNUSED
(
vehicle
);
Q_UNUSED
(
outgoingLink
);
Q_UNUSED
(
message
);
// Generic plugin does no message adjustment
}
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
72f342d7
...
...
@@ -193,10 +193,13 @@ public:
/// Called before any mavlink message is sent to the Vehicle so 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.
///
/// This method must be thread safe.
///
/// @param vehicle Vehicle message came from
/// @param outgoingLink Link that messae is going out on
/// @param message[in,out] Mavlink message to adjust if needed.
virtual
void
adjustOutgoingMavlinkMessage
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
);
virtual
void
adjustOutgoingMavlinkMessage
ThreadSafe
(
Vehicle
*
vehicle
,
LinkInterface
*
outgoingLink
,
mavlink_message_t
*
message
);
/// Determines how to handle the first item of the mission item list. Internally to QGC the first item
/// is always the home position.
...
...
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