mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
byteorder is now mandatory in to_bytes vim pyproject.toml !
This commit is contained in:
parent
fd67639966
commit
2ccc121bd8
3 changed files with 10 additions and 10 deletions
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "meshcore"
|
||||
version = "2.2.0"
|
||||
version = "2.2.1"
|
||||
authors = [
|
||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ class ContactCommands(CommandHandlerBase):
|
|||
data = (
|
||||
b"\x09"
|
||||
+ bytes.fromhex(contact["public_key"])
|
||||
+ contact["type"].to_bytes(1)
|
||||
+ flags.to_bytes(1)
|
||||
+ contact["type"].to_bytes(1, "little")
|
||||
+ flags.to_bytes(1, "little")
|
||||
+ out_path_len.to_bytes(1, "little", signed=True)
|
||||
+ bytes.fromhex(out_path_hex)
|
||||
+ bytes.fromhex(adv_name_hex)
|
||||
|
|
|
|||
|
|
@ -106,9 +106,9 @@ class DeviceCommands(CommandHandlerBase):
|
|||
)
|
||||
data = (
|
||||
b"\x26"
|
||||
+ manual_add_contacts.to_bytes(1)
|
||||
+ telemetry_mode.to_bytes(1)
|
||||
+ advert_loc_policy.to_bytes(1)
|
||||
+ manual_add_contacts.to_bytes(1, "little")
|
||||
+ telemetry_mode.to_bytes(1, "little")
|
||||
+ advert_loc_policy.to_bytes(1, "little")
|
||||
)
|
||||
return await self.send(data, [EventType.OK, EventType.ERROR])
|
||||
|
||||
|
|
@ -120,10 +120,10 @@ class DeviceCommands(CommandHandlerBase):
|
|||
)
|
||||
data = (
|
||||
b"\x26"
|
||||
+ infos["manual_add_contacts"].to_bytes(1)
|
||||
+ telemetry_mode.to_bytes(1)
|
||||
+ infos["adv_loc_policy"].to_bytes(1)
|
||||
+ infos["multi_acks"].to_bytes(1)
|
||||
+ infos["manual_add_contacts"].to_bytes(1, "little")
|
||||
+ telemetry_mode.to_bytes(1, "little")
|
||||
+ infos["adv_loc_policy"].to_bytes(1, "little")
|
||||
+ infos["multi_acks"].to_bytes(1, "little")
|
||||
)
|
||||
return await self.send(data, [EventType.OK, EventType.ERROR])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue