-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs to new plugin archicture #88
Conversation
@@ -24,7 +24,7 @@ The architecture has stubs for serial, TCP, and UDP connections. However, only U | |||
|
|||
### Why is libCURL a dependency? | |||
|
|||
libCURL will be required to download the camera definition file which is referenced in [CAMERA_INFORMATION](http://mavlink.org/messages/common#CAMERA_INFORMATION). It might also come in handy whenever any other REST resources are required. | |||
libCURL will be required to download the camera definition file which is referenced in [CAMERA_INFORMATION](http://mavlink.org/messages/common#CAMERA_INFORMATION). It might also come in handy whenever any other REST resources are required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julianoes Where does DroneCore use CAMERA_INFORMATION?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehe, that's still proprietary but I'll open source that camera plugin soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Created #90 just to make sure this doesn't fall off the radar
@@ -64,7 +64,6 @@ The most important classes are: | |||
- [Gimbal](/api_reference/classdronecore_1_1_gimbal.md): Control a gimbal. | |||
- [FollowMe](/api_reference/classdronecore_1_1_follow_me.md): Drone tracks a position supplied by DroneCore. | |||
- [Logging](/api_reference/classdronecore_1_1_logging.md): Data logging and streaming from the vehicle. | |||
- [include/device_plugin_container.h.in](https://github.com/dronecore/DroneCore/blob/{{ book.github_branch }}/include/device_plugin_container.h.in): Auto-generated file that is required for DroneCore plugin development - see [DevicePluginContainer](/api_reference/classdronecore_1_1_device_plugin_container.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted the DevicePluginContainer. Need to know if need to add: PluginBase, and MavlinkHandlerTableEntry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just yet, I think.
* [Vehicle Information](guide/device_version.md) | ||
* [Telemetry](guide/telemetry.md) | ||
* [Taking Off and Landing](guide/taking_off_landing.md) | ||
* [Actions - Take Off, Arm, ...](guide/taking_off_landing.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to focus on "Actions" old name too specific for broad content of topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
@@ -0,0 +1,58 @@ | |||
# dronecore::PluginBase Class Reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julianoes If this is public, need some docs.
|
||
The following code assumes that you already have included DroneCore (`#include <dronecore/dronecore.h>`) and that there is a [connection to a device](../guide/connections.md) obtained as shown below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julianoes Conscious decision here NOT to include mention of also having to link to the plugin library. Do you think this has to be mentioned? We do link to the using plugins doc that covers this sort of thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You now need to include and link to each plugin that you require. So in this case we do require info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had hoped that having that in the "Using Plugins" section would be sufficient (since all the sections otherwise have to duplicate similar instructions). Anyway, I've updated so that this is in every docs as "Create the Plugin" (rather than preconditions). OK?
@julianoes What needs to change for local installation? Do you think you could provide an example? I suspect it is just addition of the plugin libs to |
@@ -64,7 +64,6 @@ The most important classes are: | |||
- [Gimbal](/api_reference/classdronecore_1_1_gimbal.md): Control a gimbal. | |||
- [FollowMe](/api_reference/classdronecore_1_1_follow_me.md): Drone tracks a position supplied by DroneCore. | |||
- [Logging](/api_reference/classdronecore_1_1_logging.md): Data logging and streaming from the vehicle. | |||
- [include/device_plugin_container.h.in](https://github.com/dronecore/DroneCore/blob/{{ book.github_branch }}/include/device_plugin_container.h.in): Auto-generated file that is required for DroneCore plugin development - see [DevicePluginContainer](/api_reference/classdronecore_1_1_device_plugin_container.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just yet, I think.
* [Vehicle Information](guide/device_version.md) | ||
* [Telemetry](guide/telemetry.md) | ||
* [Taking Off and Landing](guide/taking_off_landing.md) | ||
* [Actions - Take Off, Arm, ...](guide/taking_off_landing.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
@@ -152,16 +161,18 @@ inline void offboard_log(const std::string &offb_mode, const std::string msg) | |||
*/ | |||
bool offb_ctrl_ned(Device &device) | |||
{ | |||
std::shared_ptr<Offboard> offboard = std::make_shared<Offboard>(&device); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually wrong. We should not create offboard
twice but only once and then pass it on as std::shared_ptr<Offboard> offboard
instead of Device &device
.
I guess we need to fix the example first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to example is here: mavlink/MAVSDK#246
Untested because I can't build dronecore mavlink/MAVSDK#245
I'll update docs after that example is merged.
@@ -24,7 +24,7 @@ The architecture has stubs for serial, TCP, and UDP connections. However, only U | |||
|
|||
### Why is libCURL a dependency? | |||
|
|||
libCURL will be required to download the camera definition file which is referenced in [CAMERA_INFORMATION](http://mavlink.org/messages/common#CAMERA_INFORMATION). It might also come in handy whenever any other REST resources are required. | |||
libCURL will be required to download the camera definition file which is referenced in [CAMERA_INFORMATION](http://mavlink.org/messages/common#CAMERA_INFORMATION). It might also come in handy whenever any other REST resources are required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehe, that's still proprietary but I'll open source that camera plugin soon.
|
||
The following code assumes that you already have included DroneCore (`#include <dronecore/dronecore.h>`) and that there is a [connection to a device](../guide/connections.md) obtained as shown below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You now need to include and link to each plugin that you require. So in this case we do require info.
@julianoes I've updated in line with your feedback. More to do, but I'd like to get this PR in - can you check again please? |
Thanks, your comments make sense. I'll look into your PR and issue. |
OK to merge this @julianoes ? There is more to be done - like updating for the Offboard example (mavlink/MAVSDK#246), and looking at the external example, but I'd like to get this in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure this can then go in.
Thanks! |
This PR updates docs to match up with mavlink/MAVSDK#188
Examples and most of guide done (though there will be further comments inline). This also includes docs from mavlink/MAVSDK#242 (not yet merged). Writing plugins and extensions not yet done. Some outstanding questions/actions
@julianoes Even though this is not "complete", provided it is accurate as is, it might be worth accepting and then doing how to write plugins etc as separate PRs.