Skip to content

Commit 0ef2093

Browse files
authored
Merge pull request mavlink#426 from mavlink/pr-fix-formatting-again
docs: another try to fix formatting
2 parents 416d686 + 3ea4999 commit 0ef2093

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mavsdk/source/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@ Install using pip from PyPi
3232

3333
To install simply run:
3434

35+
.. code:: bash
36+
3537
pip3 install mavsdk
3638
3739
3840
The package contains ``mavsdk_server`` already (previously called "backend"), which is started automatically when connecting (e.g. ``await drone.connect()``). Have a look at the examples to see it used in practice. It will be something like:
3941

4042
.. code:: python
43+
4144
python
4245
from mavsdk import System
4346
...
@@ -53,6 +56,7 @@ Run the examples
5356
Once the package has been installed, the examples can be run:
5457

5558
.. code:: bash
59+
5660
examples/takeoff_and_land.py
5761
5862
The examples assume that the embedded ``mavsdk_server`` binary can be run. In some cases (e.g. on Raspberry Pi), it may be necessary to run ``mavsdk_server`` manually, and therefore to set ``mavsdk_server_address='localhost'`` as described above.
@@ -65,6 +69,7 @@ In order to get more debugging information, it is possible to run the mavsdk_ser
6569
For this case, let's assume the example was like this:
6670

6771
.. code:: python
72+
6873
drone = System()
6974
await drone.connect(system_address="udp://:14540")
7075
@@ -74,17 +79,20 @@ The mavsdk_server binary is installed using ``pip3``. If installed with ``pip3 -
7479
It can then be run in a separate console with the ``system_address`` as an argument:
7580

7681
.. code:: bash
82+
7783
~/.local/lib/python3.9/site-packages/mavsdk/bin/mavsdk_server udp://:14540
7884
7985
Without an autopilot connecting, the output will look something like:
8086

8187
.. code:: bash
88+
8289
[02:36:31|Info ] MAVSDK version: v0.50.0 (mavsdk_impl.cpp:28)
8390
[02:36:31|Info ] Waiting to discover system on udp://:14540... (connection_initiator.h:20)
8491
8592
Once an autopilot is discovered, something like this should be printed:
8693

8794
.. code:: bash
95+
8896
[02:38:12|Info ] MAVSDK version: v0.50.0 (mavsdk_impl.cpp:28)
8997
[02:38:12|Info ] Waiting to discover system on udp://:14540... (connection_initiator.h:20)
9098
[02:39:01|Info ] New system on: 127.0.0.1:14580 (with sysid: 1) (udp_connection.cpp:194)

0 commit comments

Comments
 (0)