mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
byteorder is now mandatory in to_bytes vim pyproject.toml !
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meshcore"
|
name = "meshcore"
|
||||||
version = "2.2.0"
|
version = "2.2.1"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ class ContactCommands(CommandHandlerBase):
|
|||||||
data = (
|
data = (
|
||||||
b"\x09"
|
b"\x09"
|
||||||
+ bytes.fromhex(contact["public_key"])
|
+ bytes.fromhex(contact["public_key"])
|
||||||
+ contact["type"].to_bytes(1)
|
+ contact["type"].to_bytes(1, "little")
|
||||||
+ flags.to_bytes(1)
|
+ flags.to_bytes(1, "little")
|
||||||
+ out_path_len.to_bytes(1, "little", signed=True)
|
+ out_path_len.to_bytes(1, "little", signed=True)
|
||||||
+ bytes.fromhex(out_path_hex)
|
+ bytes.fromhex(out_path_hex)
|
||||||
+ bytes.fromhex(adv_name_hex)
|
+ bytes.fromhex(adv_name_hex)
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ class DeviceCommands(CommandHandlerBase):
|
|||||||
)
|
)
|
||||||
data = (
|
data = (
|
||||||
b"\x26"
|
b"\x26"
|
||||||
+ manual_add_contacts.to_bytes(1)
|
+ manual_add_contacts.to_bytes(1, "little")
|
||||||
+ telemetry_mode.to_bytes(1)
|
+ telemetry_mode.to_bytes(1, "little")
|
||||||
+ advert_loc_policy.to_bytes(1)
|
+ advert_loc_policy.to_bytes(1, "little")
|
||||||
)
|
)
|
||||||
return await self.send(data, [EventType.OK, EventType.ERROR])
|
return await self.send(data, [EventType.OK, EventType.ERROR])
|
||||||
|
|
||||||
@@ -120,10 +120,10 @@ class DeviceCommands(CommandHandlerBase):
|
|||||||
)
|
)
|
||||||
data = (
|
data = (
|
||||||
b"\x26"
|
b"\x26"
|
||||||
+ infos["manual_add_contacts"].to_bytes(1)
|
+ infos["manual_add_contacts"].to_bytes(1, "little")
|
||||||
+ telemetry_mode.to_bytes(1)
|
+ telemetry_mode.to_bytes(1, "little")
|
||||||
+ infos["adv_loc_policy"].to_bytes(1)
|
+ infos["adv_loc_policy"].to_bytes(1, "little")
|
||||||
+ infos["multi_acks"].to_bytes(1)
|
+ infos["multi_acks"].to_bytes(1, "little")
|
||||||
)
|
)
|
||||||
return await self.send(data, [EventType.OK, EventType.ERROR])
|
return await self.send(data, [EventType.OK, EventType.ERROR])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user