Skip to content

Commit

Permalink
ftp: warn of incorrect component ID
Browse files Browse the repository at this point in the history
allow user to see bug ArduPilot/ardupilot#24633
  • Loading branch information
tridge committed Aug 14, 2023
1 parent 2ca8c5a commit c9328b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion MAVProxy/modules/mavproxy_ftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def __init__(self, mpstate):
self.write_recv_idx = -1
self.write_pending = 0
self.write_last_send = None
self.warned_component = False

def cmd_ftp(self, args):
'''FTP operations'''
Expand Down Expand Up @@ -716,7 +717,9 @@ def mavlink_packet(self, m):
if mtype == "FILE_TRANSFER_PROTOCOL":
if (m.target_system != self.settings.source_system or
m.target_component != self.settings.source_component):
# this is not for me
if m.target_system == self.settings.source_system and not self.warned_component:
self.warned_component = True
print("FTP reply for mavlink component %u" % m.target_component)
return

op = self.op_parse(m)
Expand Down

0 comments on commit c9328b1

Please sign in to comment.