6 from __future__
import print_function
8 from pymavlink
import mavtest, mavutil
10 from argparse
import ArgumentParser
11 parser = ArgumentParser(description=__doc__)
13 parser.add_argument(
"--baudrate", type=int,
14 help=
"master port baud rate", default=115200)
15 parser.add_argument(
"--device", required=
True, help=
"serial device")
16 parser.add_argument(
"--source-system", dest=
'SOURCE_SYSTEM', type=int,
17 default=255, help=
'MAVLink source system for this GCS')
18 args = parser.parse_args()
21 '''wait for a heartbeat so we know the target system IDs''' 22 print(
"Waiting for APM heartbeat")
23 msg = m.recv_match(type=
'HEARTBEAT', blocking=
True)
24 print(
"Heartbeat from APM (system %u component %u)" % (m.target_system, m.target_system))
27 master = mavutil.mavlink_connection(args.device, baud=args.baudrate, source_system=args.SOURCE_SYSTEM)
32 print(
"Sending all message types")
33 mavtest.generate_outputs(master.mav)