mirror of
https://github.com/okalachev/flix.git
synced 2026-02-16 23:21:31 +00:00
Drop messages from another systems in pyflix
We shouldn't pass messages where system id != our system id. This change may be useful when there are many drones in one network.
This commit is contained in:
@@ -138,7 +138,7 @@ class Flix:
|
||||
while True:
|
||||
try:
|
||||
msg: Optional[mavlink.MAVLink_message] = self.connection.recv_match(blocking=True)
|
||||
if msg is None:
|
||||
if msg is None or msg.get_srcSystem() != self.system_id:
|
||||
continue
|
||||
self._connected()
|
||||
msg_dict = msg.to_dict()
|
||||
|
||||
Reference in New Issue
Block a user