mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
some fixes in return events
This commit is contained in:
parent
dd908484f7
commit
d61720fc9f
7 changed files with 10 additions and 10 deletions
|
|
@ -174,10 +174,10 @@ class MessageReader:
|
|||
result = {"messages_available": False}
|
||||
await self.dispatcher.dispatch(Event(EventType.NO_MORE_MSGS, result))
|
||||
|
||||
elif packet_type_value == PacketType.CONTACT_SHARE.value:
|
||||
elif packet_type_value == PacketType.CONTACT_URI.value:
|
||||
contact_uri = "meshcore://" + data[1:].hex()
|
||||
result = {"uri": contact_uri}
|
||||
await self.dispatcher.dispatch(Event(EventType.CONTACT_SHARE, result))
|
||||
await self.dispatcher.dispatch(Event(EventType.CONTACT_URI, result))
|
||||
|
||||
elif packet_type_value == PacketType.BATTERY.value:
|
||||
battery_level = int.from_bytes(data[1:3], byteorder='little')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue