byteorder is now mandatory in to_bytes vim pyproject.toml !

This commit is contained in:
Florent 2025-11-15 18:27:23 +01:00
parent fd67639966
commit 2ccc121bd8
3 changed files with 10 additions and 10 deletions

View file

@ -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" },

View file

@ -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)

View file

@ -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])