Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ mavlink-headers


# vitepress - Docs guide
docs/node_modules/
docs/.vitepress/cache/
docs/.vitepress/dist/
cpp/docs/node_modules/
cpp/docs/.vitepress/cache/
cpp/docs/.vitepress/dist/

# Fuzzing
fuzz_corpus
4 changes: 2 additions & 2 deletions cpp/docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export default defineConfig({
pattern: ({ filePath, frontmatter }) => {
if (frontmatter.newEditLink) {
//newEditLink defines a frontmatter key you can use to append a path to main
return `https://github.com/mavlink/MAVSDK/edit/main/docs/${frontmatter.newEditLink}`;
return `https://github.com/mavlink/MAVSDK/edit/main/cpp/docs/${frontmatter.newEditLink}`;
} else {
return `https://github.com/mavlink/MAVSDK/edit/main/docs/${filePath}`;
return `https://github.com/mavlink/MAVSDK/edit/main/cpp/docs/${filePath}`;
}
},
text: "Edit on GitHub",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ using mavsdk::ActionServer::TerminateHandle = Handle<Result, bool>

Flight modes.

For more information about flight modes, check out [https://docs.px4.io/master/en/config/flight_mode.html](https://docs.px4.io/master/en/config/flight_mode.html).
For more information about flight modes, check out [Flight Modes](https://docs.px4.io/main/en/config/flight_mode.html).

Value | Description
--- | ---
Expand Down
2 changes: 1 addition & 1 deletion cpp/docs/en/cpp/api_reference/classmavsdk_1_1_camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
----


Can be used to manage cameras that implement the MAVLink [Camera](classmavsdk_1_1_camera.md) Protocol: [https://mavlink.io/en/protocol/camera.html](https://mavlink.io/en/protocol/camera.html).
Can be used to manage cameras that implement the MAVLink [Camera](classmavsdk_1_1_camera.md) Protocol: [Camera Protocol v2](https://mavlink.io/en/services/camera.html).


Currently only a single camera is supported. When multiple cameras are supported the plugin will need to be instantiated separately for every camera and the camera selected using `select_camera`.
Expand Down
2 changes: 1 addition & 1 deletion cpp/docs/en/cpp/api_reference/classmavsdk_1_1_gimbal.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
----


Provide control over a gimbal.
Provide control over a gimbal. Protocol: [Gimbal Protocol v2](https://mavlink.io/en/services/gimbal_v2.html)


## Data Structures
Expand Down
6 changes: 3 additions & 3 deletions cpp/docs/en/cpp/examples/autopilot_server.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Example: Autopilot Server

The [Autopilot Server](https://github.com/mavlink/MAVSDK/tree/main/examples/autopilot_server) example creates two instances of MAVSDK, representing a client (GCS) and a server (Vehicle).
The [Autopilot Server](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/autopilot_server) example creates two instances of MAVSDK, representing a client (GCS) and a server (Vehicle).
The MAVSDK instances communicates with each other via UDP transmitting telemetry, publishing parameters, missions and takeoff commands.

::: info
Expand Down Expand Up @@ -256,5 +256,5 @@ system, without the need for a separate external autopilot.

## Source code {#source_code}

- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/examples/autopilot_server/CMakeLists.txt)
- [autopilot_server.cpp](https://github.com/mavlink/MAVSDK/blob/main/examples/autopilot_server/autopilot_server.cpp)
- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/autopilot_server/CMakeLists.txt)
- [autopilot_server.cpp](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/autopilot_server/autopilot_server.cpp)
6 changes: 3 additions & 3 deletions cpp/docs/en/cpp/examples/fly_mission.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Example: Fly Mission

The [Fly Mission](https://github.com/mavlink/MAVSDK/tree/main/examples/fly_mission) example shows how to create, upload, and run, pause, and restart missions using the SDK.
The [Fly Mission](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/fly_mission) example shows how to create, upload, and run, pause, and restart missions using the SDK.

![Fly Mission QGC Screenshot](../../../assets/examples/fly_mission/fly_mission_example_qgc.jpg)

Expand Down Expand Up @@ -99,5 +99,5 @@ The operation of most of this code is discussed in the guide: [Missions](../guid

## Source code {#source_code}

- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/examples/fly_mission/CMakeLists.txt)
- [fly_mission.cpp](https://github.com/mavlink/MAVSDK/blob/main/examples/fly_mission/fly_mission.cpp)
- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/fly_mission/CMakeLists.txt)
- [fly_mission.cpp](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/fly_mission/fly_mission.cpp)
6 changes: 3 additions & 3 deletions cpp/docs/en/cpp/examples/follow_me.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Special notes for this example:
sudo apt-get install libboost-all-dev
```
* To use *QGroundControl* with this example you **must** ensure that *GSC Position Streaming* is disabled (otherwise QGC and the SDK will both send position updates and they will conflict).
To do this use the latest *QGC Daily Build* and ensure that the **[Application Setting > General](https://docs.qgroundcontrol.com/en/SettingsView/General.html) > Miscellaneous > Stream GCS Position** is set to *Never*.
To do this use the latest *QGC Daily Build* and ensure that the **[Application Setting > General](https://docs.qgroundcontrol.com/Stable_V5.0/en/qgc-user-guide/settings_view/general.html) > Miscellaneous > Stream GCS Position** is set to *Never*.

Otherwise the example is built and run in the normal way ([as described here](../examples/index.md#trying_the_examples)).

Expand Down Expand Up @@ -114,5 +114,5 @@ The operation of the "SDK-specific" part of this code is discussed in the guide:

## Source code {#source_code}

- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/examples/follow_me/CMakeLists.txt)
- [follow_me.cpp](https://github.com/mavlink/MAVSDK/blob/main/examples/follow_me/CMakeLists.txt)
- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/follow_me/CMakeLists.txt)
- [follow_me.cpp](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/follow_me/CMakeLists.txt)
34 changes: 17 additions & 17 deletions cpp/docs/en/cpp/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ This section contains examples showing how to use MAVSDK.

Example | Description
--- | ---
[Battery](https://github.com/mavlink/MAVSDK/tree/main/examples/battery) | Simple example to demonstrate how to imitate a smart battery.
[Calibrate](https://github.com/mavlink/MAVSDK/tree/main/examples/calibrate) | Simple example showing how to initiate calibration of gyro, accelerometer, magnetometer.
[Battery](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/battery) | Simple example to demonstrate how to imitate a smart battery.
[Calibrate](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/calibrate) | Simple example showing how to initiate calibration of gyro, accelerometer, magnetometer.
[Fly Mission](../examples/fly_mission.md) | Shows how to create, upload, and run missions.
[Fly Multiple Drones](https://github.com/mavlink/MAVSDK/tree/main/examples/fly_multiple_drones) | Example to connect multiple vehicles and make them follow their own separate plan file. Also saves the telemetry information to CSV files.
[Fly Multiple Drones](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/fly_multiple_drones) | Example to connect multiple vehicles and make them follow their own separate plan file. Also saves the telemetry information to CSV files.
[Follow Me Mode](../examples/follow_me.md) | Demonstrates how to put vehicle in [Follow Me Mode](../guide/follow_me.md) and set the current target position and relative position of the drone.
[GeoFence Inclusion](https://github.com/mavlink/MAVSDK/tree/main/examples/geofence_inclusion) | Demonstrates how to define and upload a simple polygonal inclusion GeoFence.
[MAVShell](https://github.com/mavlink/MAVSDK/tree/main/examples/mavshell) | Creates and starts an interactive shell session.
[MAVLink FTP Client](https://github.com/mavlink/MAVSDK/tree/main/examples/ftp_client) | Demonstrates how to create/use a [MAVLink FTP client](https://mavlink.io/en/services/ftp.html).
[MAVLink FTP Server](https://github.com/mavlink/MAVSDK/tree/main/examples/ftp_server) | Demonstrates how to start/set up a [MAVLink FTP server](https://mavlink.io/en/services/ftp.html).
[Multiple Drones](https://github.com/mavlink/MAVSDK/tree/main/examples/multiple_drones) | Example to connect multiple vehicles and make them take off and land in parallel.
[GeoFence Inclusion](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/geofence) | Demonstrates how to define and upload a simple polygonal inclusion GeoFence.
[MAVShell](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/mavshell) | Creates and starts an interactive shell session.
[MAVLink FTP Client](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/ftp_client) | Demonstrates how to create/use a [MAVLink FTP client](https://mavlink.io/en/services/ftp.html).
[MAVLink FTP Server](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/ftp_server) | Demonstrates how to start/set up a [MAVLink FTP server](https://mavlink.io/en/services/ftp.html).
[Multiple Drones](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/multiple_drones) | Example to connect multiple vehicles and make them take off and land in parallel.
[Offboard Velocity Control](../examples/offboard_velocity.md) | Demonstrates how to control a vehicle in Offboard mode using velocity commands (in both the NED and body frames).
[Takeoff and Land](../examples/takeoff_and_land.md) | Shows basic usage of the SDK (connect to port, detect system (vehicle), arm, takeoff, land, get telemetry)
[VTOL Transitions](../examples/transition_vtol_fixed_wing.md) | Shows how to transition a VTOL vehicle between copter and fixed-wing modes.
[Tune](https://github.com/mavlink/MAVSDK/tree/main/examples/tune) | Shows how to construct and play a tune.
[Tune](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/tune) | Shows how to construct and play a tune.

The examples are "largely" built and run in the same way, as described in the following section (any exceptions are covered in the page for the associated example).

Expand All @@ -32,7 +32,7 @@ Care should be taken if using them on a real vehicle.

## Trying the Examples {#trying_the_examples}

The easiest way to test the examples is to use a [simulated PX4 vehicle](https://docs.px4.io/master/en/simulation/) that is running on the same computer.
The easiest way to test the examples is to use a [simulated PX4 vehicle](https://docs.px4.io/main/en/simulation/) that is running on the same computer.
First start PX4 in SITL (Simulation), optionally start *QGroundControl* to observe the vehicle, then build and run the example code.

::: info
Expand All @@ -43,26 +43,26 @@ The examples connect to this port using either [add_any_connection()](../api_ref

### Setting up a Simulator

PX4 supports a [number of simulators](https://docs.px4.io/master/en/simulation/).
In order to set up the [jMAVSim](https://docs.px4.io/master/en/simulation/jmavsim.html) or [Gazebo](https://docs.px4.io/master/en/simulation/gazebo.html) simulator, you can simply follow the standard PX4 toolchain setup instructions for [macOS](https://docs.px4.io/master/en/dev_setup/dev_env_mac.html) or [Ubuntu Linux](https://docs.px4.io/master/en/dev_setup/dev_env_linux_ubuntu.html).
PX4 supports a [number of simulators](https://docs.px4.io/main/en/simulation/).
In order to set up the [jMAVSim](https://docs.px4.io/main/en/sim_jmavsim/) or [Gazebo](https://docs.px4.io/main/en/sim_gazebo_gz/) simulator, you can simply follow the standard PX4 toolchain setup instructions for [macOS](https://docs.px4.io/main/en/dev_setup/dev_env_mac.html) or [Ubuntu Linux](https://docs.px4.io/main/en/dev_setup/dev_env_linux_ubuntu.html).

::: info
JMAVSim can only be used to simulate multicopters.
Gazebo additionally supports a number of [other vehicles](https://docs.px4.io/master/en/simulation/gazebo.html#html#running-the-simulation) (e.g. VTOL, Rovers, fixed-wing etc.).
Gazebo additionally supports a number of [other vehicles](https://docs.px4.io/main/en/sim_gazebo_gz/#running-the-simulation) (e.g. VTOL, Rovers, fixed-wing etc.).
:::

After running a standard installation, a simulation can be started from the PX4 **/Firmware** directory using the command:
* Multicopter (jMAVSim): `make px4_sitl jmavsim`
* Multicopter (Gazebo): `make px4_sitl gazebo`
* VTOL (Gazebo): `make px4_sitl gazebo_standard_vtol`
* Multicopter (Gazebo): `make px4_sitl gz_x500`
* VTOL (Gazebo): `make px4_sitl gz_standard_vtol`


### Using QGroundControl

You can use *QGroundControl* to connect to PX4 and observe vehicle movement and behaviour while the examples are running.
*QGroundControl* will automatically connect to the PX4 simulation as soon as it is started.

See [QGroundControl > Download and Install](https://docs.qgroundcontrol.com/en/getting_started/download_and_install.html) for information about setting up *QGroundControl* on your platform.
See [QGroundControl > Download and Install](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/getting_started/download_and_install.html) for information about setting up *QGroundControl* on your platform.


### Building the Examples {#build_examples}
Expand All @@ -74,7 +74,7 @@ See [installation guide](../guide/installation.md) if that is not already the ca

Then build the example:
```sh
cd examples/takeoff_and_land/
cd cpp/examples/takeoff_and_land/
cmake -Bbuild -S.
cmake --build build -j4
```
Expand Down
4 changes: 2 additions & 2 deletions cpp/docs/en/cpp/examples/offboard_velocity.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ The operation of most of this code is discussed in the guide: [Offboard Control]

## Source code {#source_code}

- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/examples/offboard/CMakeLists.txt)
- [offboard_velocity.cpp](https://github.com/mavlink/MAVSDK/blob/main/examples/offboard/offboard.cpp)
- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/offboard/CMakeLists.txt)
- [offboard_velocity.cpp](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/offboard/offboard.cpp)
8 changes: 4 additions & 4 deletions cpp/docs/en/cpp/examples/takeoff_and_land.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ After a short wait the vehicle lands.
While flying the vehicle receives telemetry. The example is implemented in C++ (only).

::: tip
The full source code for the example [can be found here](https://github.com/mavlink/MAVSDK/tree/main/examples/takeoff_and_land).
The full source code for the example [can be found here](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/takeoff_and_land).
:::

## Running the Example {#run_example}
Expand Down Expand Up @@ -62,8 +62,8 @@ Finished...
## Source code {#source_code}

::: tip
The full source code for the example [can be found on Github here](https://github.com/mavlink/MAVSDK/tree/main/examples/takeoff_and_land).
The full source code for the example [can be found on Github here](https://github.com/mavlink/MAVSDK/tree/main/cpp/examples/takeoff_and_land).
:::

- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/examples/takeoff_and_land/CMakeLists.txt)
- [takeoff_and_land.cpp](https://github.com/mavlink/MAVSDK/blob/main/examples/takeoff_and_land/takeoff_and_land.cpp)
- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/takeoff_and_land/CMakeLists.txt)
- [takeoff_and_land.cpp](https://github.com/mavlink/MAVSDK/blob/main/cpp/examples/takeoff_and_land/takeoff_and_land.cpp)
6 changes: 3 additions & 3 deletions cpp/docs/en/cpp/examples/transition_vtol_fixed_wing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The example must be run against a VTOL aircraft (simulated or otherwise).
Otherwise the example is built and run [in the standard way](../examples/index.md#trying_the_examples).

::: tip
Instructions for running the Gazebo simulator for a standard VTOL can be found here: [PX4 Development Guide > Gazebo Simulation](https://docs.px4.io/master/en/simulation/gazebo.html#standard-vtol).
Instructions for running the Gazebo simulator for a standard VTOL can be found here: [PX4 Development Guide > Gazebo Simulation](https://docs.px4.io/main/en/sim_gazebo_gz/vehicles#standard-vtol).
jMAVSim does not support VTOL simulation.
:::

Expand Down Expand Up @@ -74,5 +74,5 @@ The operation of the transition code is discussed in the guide: [Takeoff and Lan

## Source code {#source_code}

- [CMakeLists.txt](https://github.com/mavlink/MAVSDK/blob/main/examples/transition_vtol_fixed_wing/CMakeLists.txt)
- [transition_vtol_fixed_wing.cpp](https://github.com/mavlink/MAVSDK/blob/main/examples/transition_vtol_fixed_wing/transition_vtol_fixed_wing.cpp)
- [CMakeLists.txt](https://github.com/JoC2000/MAVSDK/blob/main/cpp/examples/vtol_transition/CMakeLists.txt)
- [transition_vtol_fixed_wing.cpp](https://github.com/JoC2000/MAVSDK/blob/main/cpp/examples/vtol_transition/vtol_transition.cpp)
4 changes: 2 additions & 2 deletions cpp/docs/en/cpp/guide/dev_logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It is not exported, or intended, for use in SDK apps (and we do not commit to ma

### Usage

The API is defined in [src/core/log.h](https://github.com/mavlink/MAVSDK/blob/main/src/core/log.h).
The API is defined in [src/core/log.h](https://github.com/JoC2000/MAVSDK/blob/main/cpp/src/mavsdk/core/log.h).

The API methods are called as shown below for `LogDebug()`, with the insertion operator (`<<`) used to append the message-specific text.

Expand All @@ -40,6 +40,6 @@ Function | Description | Example
Basic logging is defined in source for both incoming (handled/ignored) and sent MAVLink messages.

This functionality is disabled by default, and available only in debug build when built from source.
To enable the logs, set `#define MESSAGE_DEBUGGING 1` in [src/core/system.cpp](https://github.com/mavlink/MAVSDK/blob/main/src/core/system.cpp)
To enable the logs, set `#define MESSAGE_DEBUGGING 1` in [src/core/system.cpp](https://github.com/JoC2000/MAVSDK/blob/main/cpp/src/mavsdk/core/system.cpp)

<!-- Added: https://github.com/mavlink/MAVSDK/pull/194 -->
6 changes: 3 additions & 3 deletions cpp/docs/en/cpp/guide/follow_me.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Follow Me

The [Follow Me](../api_reference/classmavsdk_1_1_follow_me.md) class is used to engage the PX4 [Follow Me Mode](https://docs.px4.io/master/en/flight_modes/follow_me.html) (multicopter only).
The [Follow Me](../api_reference/classmavsdk_1_1_follow_me.md) class is used to engage the PX4 [Follow Me Mode](https://docs.px4.io/main/en/flight_modes/follow_me.html) (multicopter only).
In this mode a copter will automatically yaw to face and follow a user at a specified position and distance.

The API is used to supply the position(s) for the [target](../api_reference/structmavsdk_1_1_follow_me_1_1_target_location.md) and the relative [follow position](../api_reference/structmavsdk_1_1_follow_me_1_1_config.md) of the vehicle.
Expand All @@ -12,7 +12,7 @@ Applications must get target position information from the underlying platform (
::: warning
Running *QGroundControl* at the same time as the SDK *Follow Me* may result in unpredictable behaviour as both send position updates.
You **must** ensure that *GSC Position Streaming* is disabled.
Use the latest *QGC Daily Build* and ensure that the **[Application Setting > General](https://docs.qgroundcontrol.com/en/SettingsView/General.html) > Miscellaneous > Stream GCS Position** is set to *Never*.
Use the latest *QGC Daily Build* and ensure that the **[Application Setting > General](https://docs.qgroundcontrol.com/Stable_V5.0/en/qgc-user-guide/settings_view/general.html) > Miscellaneous > Stream GCS Position** is set to *Never*.
:::

## Create the Plugin
Expand Down Expand Up @@ -74,7 +74,7 @@ auto curr_config = follow_me.get_config();

## Following a Target

To start and stop following a target, call [start()](../api_reference/classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a4b6ae3ec1ff07d8b3a79038e04992003) and [stop()](../api_reference/classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a202a7b9edf56d9b883c974a09c14ba7d), respectively - `start()` puts the vehicle into [Follow-Me mode](https://docs.px4.io/master/en/flight_modes/follow_me.html) and `stop()` puts it into [Hold mode](https://docs.px4.io/master/en/flight_modes/hold.html).
To start and stop following a target, call [start()](../api_reference/classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a4b6ae3ec1ff07d8b3a79038e04992003) and [stop()](../api_reference/classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a202a7b9edf56d9b883c974a09c14ba7d), respectively - `start()` puts the vehicle into [Follow-Me mode](https://docs.px4.io/main/en/flight_modes/follow_me.html) and `stop()` puts it into [Hold mode](https://docs.px4.io/main/en/flight_modes/hold.html).

Use [set_target_location()](../api_reference/classmavsdk_1_1_follow_me.md#classmavsdk_1_1_follow_me_1a1a99e282472235f726bfde430873ffd5) to set the target position(s) for the vehicle to follow (the app typically passes its host's current position, which it would obtain using OS-specific methods).
This can be called at any time, but messages will only be sent once following is started.
Expand Down
Loading
Loading