Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinelliott committed Jul 18, 2024
2 parents c73a622 + 18cd592 commit c34a05b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ async def handle_log(self, msg):
f.write(f"{msg.payload.decode('utf-8')}\n")

async def handle_neighborinfo(self, msg):
msg['from'] = f'{msg["from"]:x}'
msg['from'] = utils.convert_node_id_from_int_to_hex(msg["from"])
if 'to' in msg:
msg['to'] = f'{msg["to"]:x}'
msg['to'] = utils.convert_node_id_from_int_to_hex(msg["to"])
if 'sender' in msg and msg['sender'] and isinstance(msg['sender'], str):
msg['sender'] = msg['sender'].replace('!', '')

Expand All @@ -276,9 +276,9 @@ async def handle_neighborinfo(self, msg):
await self.data.save()

async def handle_nodeinfo(self, msg):
msg['from'] = f'{msg["from"]:x}'
msg['from'] = utils.convert_node_id_from_int_to_hex(msg["from"])
if 'to' in msg:
msg['to'] = f'{msg["to"]:x}'
msg['to'] = utils.convert_node_id_from_int_to_hex(msg["to"])
if 'sender' in msg and msg['sender'] and isinstance(msg['sender'], str):
msg['sender'] = msg['sender'].replace('!', '')

Expand Down Expand Up @@ -319,9 +319,9 @@ async def handle_nodeinfo(self, msg):
await self.data.save()

async def handle_position(self, msg):
msg['from'] = f'{msg["from"]:x}'
msg['from'] = utils.convert_node_id_from_int_to_hex(msg["from"])
if 'to' in msg:
msg['to'] = f'{msg["to"]:x}'
msg['to'] = utils.convert_node_id_from_int_to_hex(msg["to"])
if 'sender' in msg and msg['sender'] and isinstance(msg['sender'], str):
msg['sender'] = msg['sender'].replace('!', '')

Expand All @@ -339,9 +339,9 @@ async def handle_position(self, msg):
await self.data.save()

async def handle_telemetry(self, msg):
msg['from'] = f'{msg["from"]:x}'
msg['from'] = utils.convert_node_id_from_int_to_hex(msg["from"])
if 'to' in msg:
msg['to'] = f'{msg["to"]:x}'
msg['to'] = utils.convert_node_id_from_int_to_hex(msg["to"])
if 'sender' in msg and msg['sender'] and isinstance(msg['sender'], str):
msg['sender'] = msg['sender'].replace('!', '')

Expand All @@ -367,9 +367,9 @@ async def handle_telemetry(self, msg):
await self.data.save()

async def handle_text(self, msg):
msg['from'] = f'{msg["from"]:x}'
msg['from'] = utils.convert_node_id_from_int_to_hex(msg["from"])
if 'to' in msg:
msg['to'] = f'{msg["to"]:x}'
msg['to'] = utils.convert_node_id_from_int_to_hex(msg["to"])
if 'sender' in msg and msg['sender'] and isinstance(msg['sender'], str):
msg['sender'] = msg['sender'].replace('!', '')
if 'channel' not in msg:
Expand Down Expand Up @@ -398,9 +398,9 @@ async def handle_text(self, msg):
await self.data.save()

async def handle_traceroute(self, msg):
msg['from'] = f'{msg["from"]:x}'
msg['from'] = utils.convert_node_id_from_int_to_hex(msg["from"])
if 'to' in msg:
msg['to'] = f'{msg["to"]:x}'
msg['to'] = utils.convert_node_id_from_int_to_hex(msg["to"])
if 'sender' in msg and msg['sender'] and isinstance(msg['sender'], str):
msg['sender'] = msg['sender'].replace('!', '')
msg['route'] = msg['payload']['route']
Expand Down

0 comments on commit c34a05b

Please sign in to comment.