forked from chiyu1468/AirTrapMine
新增 devRun.py 測試檔案
This commit is contained in:
@@ -18,8 +18,8 @@ from fc_network_adapter import mavlinkDevice as md
|
|||||||
|
|
||||||
# ====================== 分割線 =====================
|
# ====================== 分割線 =====================
|
||||||
|
|
||||||
test_item = 21
|
test_item = 12
|
||||||
running_time = 30
|
running_time = 500
|
||||||
|
|
||||||
|
|
||||||
print('test_item : ', test_item)
|
print('test_item : ', test_item)
|
||||||
@@ -130,16 +130,16 @@ elif test_item == 12:
|
|||||||
time.sleep(0.5) # 等待事件循環啟動
|
time.sleep(0.5) # 等待事件循環啟動
|
||||||
|
|
||||||
# 初始化輸入通道
|
# 初始化輸入通道
|
||||||
connection_string="udp:127.0.0.1:14560"
|
connection_string="udp:127.0.0.1:14554"
|
||||||
mavlink_socket_in1 = mavutil.mavlink_connection(connection_string)
|
mavlink_socket_in1 = mavutil.mavlink_connection(connection_string)
|
||||||
mavlink_object_in1 = mo.mavlink_object(mavlink_socket_in1)
|
mavlink_object_in1 = mo.mavlink_object(mavlink_socket_in1)
|
||||||
|
|
||||||
connection_string="udp:127.0.0.1:14561"
|
connection_string="udp:127.0.0.1:14551"
|
||||||
mavlink_socket_in2 = mavutil.mavlink_connection(connection_string)
|
mavlink_socket_in2 = mavutil.mavlink_connection(connection_string)
|
||||||
mavlink_object_in2 = mo.mavlink_object(mavlink_socket_in2)
|
mavlink_object_in2 = mo.mavlink_object(mavlink_socket_in2)
|
||||||
|
|
||||||
# 初始化輸出通道
|
# 初始化輸出通道
|
||||||
connection_string="udpout:127.0.0.1:14550"
|
connection_string="udpout:127.0.0.1:14553"
|
||||||
mavlink_socket_out = mavutil.mavlink_connection(connection_string)
|
mavlink_socket_out = mavutil.mavlink_connection(connection_string)
|
||||||
mavlink_object_out = mo.mavlink_object(mavlink_socket_out)
|
mavlink_object_out = mo.mavlink_object(mavlink_socket_out)
|
||||||
|
|
||||||
@@ -445,4 +445,4 @@ elif test_item == 21:
|
|||||||
# analyzer.thread.join()
|
# analyzer.thread.join()
|
||||||
|
|
||||||
# mavlink_socket3.close()
|
# mavlink_socket3.close()
|
||||||
# print('<=== End of Program')
|
# print('<=== End of Program')
|
||||||
|
|||||||
Reference in New Issue
Block a user