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
17b3e2b2
Unverified
Commit
17b3e2b2
authored
Jun 03, 2019
by
Gus Grubba
Committed by
GitHub
Jun 03, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7487 from mavlink/gimbalCommand
Add gimbal control command to Vehicle
parents
2533d1df
1a87d7f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
Vehicle.cc
src/Vehicle/Vehicle.cc
+15
-0
Vehicle.h
src/Vehicle/Vehicle.h
+2
-0
No files found.
src/Vehicle/Vehicle.cc
View file @
17b3e2b2
...
...
@@ -3977,6 +3977,21 @@ void Vehicle::flashBootloader(void)
}
#endif
void
Vehicle
::
gimbalControlValue
(
double
pitch
,
double
yaw
)
{
qDebug
()
<<
"Gimbal: "
<<
pitch
<<
yaw
;
sendMavCommand
(
_defaultComponentId
,
MAV_CMD_DO_MOUNT_CONTROL
,
false
,
// show errors
static_cast
<
float
>
(
pitch
),
// Pitch 0 - 90
0
,
// Roll (not used)
static_cast
<
float
>
(
yaw
),
// Yaw -180 - 180
0
,
// Altitude (not used)
0
,
// Latitude (not used)
0
,
// Longitude (not used)
MAV_MOUNT_MODE_MAVLINK_TARGETING
);
// MAVLink Roll,Pitch,Yaw
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
...
src/Vehicle/Vehicle.h
View file @
17b3e2b2
...
...
@@ -761,6 +761,8 @@ public:
Q_INVOKABLE
void
setPIDTuningTelemetryMode
(
bool
pidTuning
);
Q_INVOKABLE
void
gimbalControlValue
(
double
pitch
,
double
yaw
);
#if !defined(NO_ARDUPILOT_DIALECT)
Q_INVOKABLE
void
flashBootloader
(
void
);
#endif
...
...
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