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
9866b603
Commit
9866b603
authored
Oct 23, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New virtual for APM style mission support
parent
0cca6771
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
1 deletion
+33
-1
APMFirmwarePlugin.cc
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
+6
-0
APMFirmwarePlugin.h
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
+2
-1
FirmwarePlugin.h
src/FirmwarePlugin/FirmwarePlugin.h
+8
-0
GenericFirmwarePlugin.cc
src/FirmwarePlugin/Generic/GenericFirmwarePlugin.cc
+8
-0
GenericFirmwarePlugin.h
src/FirmwarePlugin/Generic/GenericFirmwarePlugin.h
+1
-0
PX4FirmwarePlugin.cc
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
+7
-0
PX4FirmwarePlugin.h
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
+1
-0
No files found.
src/FirmwarePlugin/APM/APMFirmwarePlugin.cc
View file @
9866b603
...
...
@@ -378,3 +378,9 @@ void APMFirmwarePlugin::setSupportedModes(QList<APMCustomMode> supportedModes)
{
_supportedModes
=
supportedModes
;
}
bool
APMFirmwarePlugin
::
sendHomePositionToVehicle
(
void
)
{
// APM stack wants the home position sent in the first position
return
true
;
}
src/FirmwarePlugin/APM/APMFirmwarePlugin.h
View file @
9866b603
...
...
@@ -87,7 +87,8 @@ public:
virtual
int
manualControlReservedButtonCount
(
void
);
virtual
void
adjustMavlinkMessage
(
mavlink_message_t
*
message
);
virtual
void
initializeVehicle
(
Vehicle
*
vehicle
);
virtual
bool
sendHomePositionToVehicle
(
void
);
protected:
/// All access to singleton is through stack specific implementation
APMFirmwarePlugin
(
QObject
*
parent
=
NULL
);
...
...
src/FirmwarePlugin/FirmwarePlugin.h
View file @
9866b603
...
...
@@ -96,6 +96,14 @@ public:
/// Called when Vehicle is first created to send any necessary mavlink messages to the firmware.
virtual
void
initializeVehicle
(
Vehicle
*
vehicle
)
=
0
;
/// Determines how to handle the first item of the mission item list. Internally to QGC the first item
/// is always the home position.
/// @return
/// true: Send first mission item as home position to vehicle. When vehicle has no mission items on
/// it, it may or may not return a home position back in position 0.
/// false: Do not send first item to vehicle, sequence numbers must be adjusted
virtual
bool
sendHomePositionToVehicle
(
void
)
=
0
;
protected:
FirmwarePlugin
(
QObject
*
parent
=
NULL
)
:
QGCSingleton
(
parent
)
{
}
...
...
src/FirmwarePlugin/Generic/GenericFirmwarePlugin.cc
View file @
9866b603
...
...
@@ -110,3 +110,11 @@ void GenericFirmwarePlugin::initializeVehicle(Vehicle* vehicle)
// Generic Flight Stack is by definition "generic", so no extra work
}
bool
GenericFirmwarePlugin
::
sendHomePositionToVehicle
(
void
)
{
// Generic stack does not want home position sent in the first position.
// Subsequent sequence numbers must be adjusted.
// This is the mavlink spec default.
return
false
;
}
src/FirmwarePlugin/Generic/GenericFirmwarePlugin.h
View file @
9866b603
...
...
@@ -46,6 +46,7 @@ public:
virtual
int
manualControlReservedButtonCount
(
void
);
virtual
void
adjustMavlinkMessage
(
mavlink_message_t
*
message
);
virtual
void
initializeVehicle
(
Vehicle
*
vehicle
);
virtual
bool
sendHomePositionToVehicle
(
void
);
private:
/// All access to singleton is through AutoPilotPluginManager::instance
...
...
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
9866b603
...
...
@@ -200,3 +200,10 @@ void PX4FirmwarePlugin::initializeVehicle(Vehicle* vehicle)
// PX4 Flight Stack doesn't need to do any extra work
}
bool
PX4FirmwarePlugin
::
sendHomePositionToVehicle
(
void
)
{
// PX4 stack does not want home position sent in the first position.
// Subsequent sequence numbers must be adjusted.
return
false
;
}
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.h
View file @
9866b603
...
...
@@ -46,6 +46,7 @@ public:
virtual
int
manualControlReservedButtonCount
(
void
);
virtual
void
adjustMavlinkMessage
(
mavlink_message_t
*
message
);
virtual
void
initializeVehicle
(
Vehicle
*
vehicle
);
virtual
bool
sendHomePositionToVehicle
(
void
);
private:
/// All access to singleton is through AutoPilotPluginManager::instance
...
...
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