Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/infuse_iot/generated/kv_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,18 @@ class memfault_disable(VLACompatLittleEndianStruct):
]
_pack_ = 1

class gateway_bluetooth_forward_options(VLACompatLittleEndianStruct):
"""Forwarding configuration for Bluetooth advertising packets"""

NAME = "GATEWAY_BLUETOOTH_FORWARD_OPTIONS"
BASE_ID = 55
RANGE = 1
_fields_ = [
("flags", ctypes.c_uint8),
("percent", ctypes.c_uint8),
]
_pack_ = 1

class gravity_reference(VLACompatLittleEndianStruct):
"""Reference gravity vector for tilt calculations"""

Expand Down Expand Up @@ -583,6 +595,7 @@ class secure_storage_reserved(VLACompatLittleEndianStruct):
52: bluetooth_throughput_limit,
53: led_disable_daily_time_range,
54: memfault_disable,
55: gateway_bluetooth_forward_options,
60: gravity_reference,
100: geofence,
101: geofence,
Expand Down
2 changes: 1 addition & 1 deletion src/infuse_iot/generated/tdf_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class tdf_struct_eui48(TdfStructBase):

@property
def val(self):
return int.from_bytes(self._val, byteorder="little")
return int.from_bytes(self._val, byteorder="big")

class tdf_struct_wifi_network_params(TdfStructBase):
"""WiFi network parameters"""
Expand Down
13 changes: 12 additions & 1 deletion src/infuse_iot/zephyr/errno.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ class errno(enum.IntEnum):
ENOMSG = (35, "Unexpected message type")
EDEADLK = (45, "Resource deadlock avoided")
ENOLCK = (46, "No locks available")
EBADE = (50, "Invalid exchange")
EBADR = (51, "Invalid request descriptor")
EXFULL = (52, "Exchange full")
ENOANO = (53, "No anode")
EBADRQC = (54, "Invalid request code")
EBADSLT = (55, "Invalid slot")
EDEADLOCK = (56, "File locking deadlock error")
EBFONT = (57, "Bad font file fmt")
ENOSTR = (60, "STREAMS device required")
ENODATA = (61, "Missing expected message data")
ETIME = (62, "STREAMS timeout occurred")
Expand Down Expand Up @@ -96,4 +104,7 @@ def __new__(cls, value: int, description: str = ""):

@classmethod
def strerror(cls, int) -> str:
return cls(int).description
try:
return cls(int).description
except ValueError:
return f"Unknown errno ({int})"