Skip to content

Commit c37dff7

Browse files
committed
examples: use new connection syntax
1 parent 492c64b commit c37dff7

37 files changed

+37
-37
lines changed

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...")

examples/gimbal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async def fetch_gimbals():
3333
async def run():
3434
# Init the drone
3535
drone = System()
36-
await drone.connect(system_address="udp://:14540")
36+
await drone.connect(system_address="udpin://0.0.0.0:14540")
3737

3838
gimbals = await get_gimbals(drone)
3939

examples/goto.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/gripper.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/highres_imu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
async def get_imu_data():
66
# Connect to the drone
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
# Wait for the drone to connect
1111
print("Waiting for drone to connect...")

examples/logfile_download.py

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

88
async def run():
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("Waiting for drone to connect...")
1313
async for state in drone.core.connection_state():

examples/manual_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def manual_controls():
3434
"""Main function to connect to the drone and input manual controls"""
3535
# Connect to the Simulation
3636
drone = System()
37-
await drone.connect(system_address="udp://:14540")
37+
await drone.connect(system_address="udpin://0.0.0.0:14540")
3838

3939
# This waits till a mavlink based drone is connected
4040
print("Waiting for drone to connect...")

examples/mission.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/mission_import.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/mission_raw.py

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

88
async def px4_connect_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
print("Waiting for drone to connect...")
1313
async for state in drone.core.connection_state():

examples/offboard_attitude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def run():
1515
""" Does Offboard control using attitude commands. """
1616

1717
drone = System()
18-
await drone.connect(system_address="udp://:14540")
18+
await drone.connect(system_address="udpin://0.0.0.0:14540")
1919

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

examples/offboard_from_csv/offboard_from_csv.py

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

109109
# Connect to the drone
110110
drone = System()
111-
await drone.connect(system_address="udp://:14540")
111+
await drone.connect(system_address="udpin://0.0.0.0:14540")
112112

113113
# Wait for the drone to connect
114114
print("Waiting for drone to connect...")

examples/offboard_position_ned.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async def run():
1818
""" Does Offboard control using position NED coordinates. """
1919

2020
drone = System()
21-
await drone.connect(system_address="udp://:14540")
21+
await drone.connect(system_address="udpin://0.0.0.0:14540")
2222

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

examples/offboard_position_velocity_ned.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/offboard_velocity_body.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async def run():
1111
""" Does Offboard control using velocity body coordinates. """
1212

1313
drone = System()
14-
await drone.connect(system_address="udp://:14540")
14+
await drone.connect(system_address="udpin://0.0.0.0:14540")
1515

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

examples/offboard_velocity_ned.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async def run():
1111
""" Does Offboard control using velocity NED coordinates. """
1212

1313
drone = System()
14-
await drone.connect(system_address="udp://:14540")
14+
await drone.connect(system_address="udpin://0.0.0.0:14540")
1515

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

examples/px4_ev_automation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async def print_mode(drone):
5252

5353
async def main():
5454
drone = System()
55-
await drone.connect(system_address="udp://:14540")
55+
await drone.connect(system_address="udpin://0.0.0.0:14540")
5656

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

examples/px4_ev_automation_keyboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async def set_params(system, params, announcement):
3232

3333
async def main():
3434
drone = System()
35-
await drone.connect(system_address="udp://:14540")
35+
await drone.connect(system_address="udpin://0.0.0.0:14540")
3636

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

examples/send_status_message.py

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

2121
drone = System(sysid=1)
22-
await drone.connect(system_address="udp://:14540")
22+
await drone.connect(system_address="udpin://0.0.0.0:14540")
2323

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

examples/shell.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
asyncio.ensure_future(observe_shell(drone))
1414

examples/takeoff_and_land.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
status_text_task = asyncio.ensure_future(print_status_text(drone))
1313

examples/telemetry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
async def run():
88
# Init 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
# Start the tasks
1313
asyncio.ensure_future(print_battery(drone))

examples/telemetry_flight_mode.py

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

77
async def print_flight_mode():
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/telemetry_is_armed_is_in_air.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
asyncio.ensure_future(print_is_armed(drone))
1212
asyncio.ensure_future(print_is_in_air(drone))

examples/telemetry_status_text.py

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

77
async def print_status_text():
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/telemetry_takeoff_and_land.py

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

2727
# Init the drone
2828
drone = System()
29-
await drone.connect(system_address="udp://:14540")
29+
await drone.connect(system_address="udpin://0.0.0.0:14540")
3030

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

examples/tune.py

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

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/upload_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def main():
1010
parser = argparse.ArgumentParser()
1111
parser.add_argument(
1212
"connection",
13-
help="Connection string (e.g. udp://:14540)")
13+
help="Connection string (e.g. udpin://0.0.0.0:14540)")
1414
parser.add_argument(
1515
"param_file", help="Param file to be uploaded with .params format")
1616

examples/winch.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():

0 commit comments

Comments
 (0)