Skip to content

Commit 26c7db0

Browse files
authored
Merge pull request #767 from mavlink/pr-fix-connection-string
Update connection strings
2 parents 2ead2b6 + ce5f09e commit 26c7db0

40 files changed

+48
-46
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ from mavsdk import System
3939
...
4040

4141
drone = System()
42-
await drone.connect(system_address="udp://:14540")
42+
await drone.connect(system_address="udpin://0.0.0.0:14540")
4343
```
4444

4545
Note: `System()` takes two named parameters: `mavsdk_server_address` and `port`. When left empty, they default to `None` and `50051`, respectively, and `mavsdk_server -p 50051` is run by `await drone.connect()`. If `mavsdk_server_address` is set (e.g. to "localhost"), then `await drone.connect()` will not start the embedded `mavsdk_server` and will try to connect to a server running at this address. This is useful for platforms where `mavsdk_server` does not come embedded, for debugging purposes, and for running `mavsdk_server` in a place different than where the MAVSDK-Python script is run.

examples/all_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
async def run():
88
# Connect to the drone
99
drone = System()
10-
await drone.connect(system_address="udp://:14540")
10+
await drone.connect(system_address="udpin://0.0.0.0:14540")
1111

1212
# Get the list of parameters
1313
all_params = await drone.param.get_all_params()

examples/calibration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
async def run():
88

99
drone = System()
10-
await drone.connect(system_address="udp://:14540")
10+
await drone.connect(system_address="udpin://0.0.0.0:14540")
1111

1212
print("-- Starting gyroscope calibration")
1313
async for progress_data in drone.calibration.calibrate_gyro():

examples/camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
async def run():
1010
drone = System()
11-
await drone.connect(system_address="udp://:14540")
11+
await drone.connect(system_address="udpin://0.0.0.0:14540")
1212

1313
print("Waiting for drone to connect...")
1414
async for state in drone.core.connection_state():

examples/camera_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
async def run():
2424
drone = System()
25-
await drone.connect(system_address="udp://:14540")
25+
await drone.connect(system_address="udpin://0.0.0.0:14540")
2626

2727
asyncio.ensure_future(observe_current_settings(drone))
2828
asyncio.ensure_future(observe_camera_mode(drone))

examples/do_orbit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
async def run():
77
drone = System()
8-
await drone.connect(system_address="udp://:14540")
8+
await drone.connect(system_address="udpin://0.0.0.0:14540")
99

1010
print("Waiting for drone to connect...")
1111
async for state in drone.core.connection_state():

examples/failure_injection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
async def run():
1010
drone = System()
11-
await drone.connect(system_address="udp://:14540")
11+
await drone.connect(system_address="udpin://0.0.0.0:14540")
1212

1313
print("Waiting for drone to connect...")
1414
async for state in drone.core.connection_state():

examples/firmware_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
async def run():
88
drone = System()
9-
await drone.connect(system_address="udp://:14540")
9+
await drone.connect(system_address="udpin://0.0.0.0:14540")
1010

1111
print("Waiting for drone to connect...")
1212
async for state in drone.core.connection_state():

examples/follow_me_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
async def run():
2727
drone = System()
28-
await drone.connect(system_address="udp://:14540")
28+
await drone.connect(system_address="udpin://0.0.0.0:14540")
2929

3030
print("Waiting for drone to connect...")
3131
async for state in drone.core.connection_state():

examples/geofence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async def run():
2121

2222
# Connect to the Simulation
2323
drone = System()
24-
await drone.connect(system_address="udp://:14540")
24+
await drone.connect(system_address="udpin://0.0.0.0:14540")
2525

2626
# Wait for the drone to connect
2727
print("Waiting for drone to connect...")

0 commit comments

Comments
 (0)