Skip to content

Commit

Permalink
useralerts: use request_message to get autopilot version
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and tridge committed Jan 3, 2024
1 parent a4d3415 commit dec5234
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions MAVProxy/modules/mavproxy_useralerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,31 +142,24 @@ def cmd_doCheck(self):
the checks for applicable User Alerts'''
self.board = None
self.version = None
for messageID in [mavutil.mavlink.MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES, mavutil.mavlink.MAV_CMD_DO_SEND_BANNER]:
self.master.mav.command_long_send(
self.settings.target_system, # target_system
self.settings.target_component, # target_component
messageID, # command
1, # confirmation
1, # param1
0, # param2
0, # param3
0, # param4
0, # param5
0, # param6
0) # param7
#self.master.mav.command_long_send(
# self.settings.target_system, # target_system
# self.settings.target_component, # target_component
# mavutil.mavlink.MAV_CMD_DO_SEND_BANNER, # command
# 1, # confirmation
# 0, # param1
# 0, # param2
# 0, # param3
# 0, # param4
# 0, # param5
# 0, # param6
# 0) # param7
self.master.mav.command_long_send(
self.settings.target_system, # target_system
self.settings.target_component, # target_component
mavutil.mavlink.MAV_CMD_DO_SEND_BANNER, # command
1, # confirmation
1, # param1
0, # param2
0, # param3
0, # param4
0, # param5
0, # param6
0) # param7
self.master.mav.command_long_send(
self.settings.target_system,
self.settings.target_component,
mavutil.mavlink.MAV_CMD_REQUEST_MESSAGE,
0, # confirmation
mavutil.mavlink.MAVLINK_MSG_ID_AUTOPILOT_VERSION, 0, 0, 0, 0, 0, 0)

def cmd_check(self, args):
'''Useralert operations'''
Expand Down

0 comments on commit dec5234

Please sign in to comment.