fixed bat reading

This commit is contained in:
Florent 2025-03-29 16:18:41 +01:00
parent ede064d993
commit 7e39b66049
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "meshcore"
version = "0.3.2"
version = "0.3.3"
authors = [
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
]

View file

@ -364,7 +364,7 @@ class MeshCore:
case 11: # contact
self.result.set_result("meshcore://" + data[1:].hex())
case 12: # battery voltage
self.result.set_result(int.from_bytes(data[1:2], byteorder='little'))
self.result.set_result(int.from_bytes(data[1:3], byteorder='little'))
case 13: # device info
res = {}
res["fw ver"] = data[1]