Skip to content

Commit 8222b48

Browse files
committed
Added binary read on reading eeprom
1 parent 78f3cc0 commit 8222b48

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "PyVantagePro_MarcoGos"
7-
version = "0.3.22"
7+
version = "0.3.23"
88
authors = [
99
{ name="Salem Harrache", email="[email protected]" },
1010
{ name="Marco Gosselink", email="[email protected]" },
1111
]
1212
dependencies = [
13-
"PyLink-MarcoGos>=0.3.4",
13+
"PyLink-MarcoGos>=0.3.5",
1414
"progressbar-latest"
1515
]
1616
description = "Communication tools for the Davis VantagePro2 devices"

pyvantagepro/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
from .logger import LOGGER, active_logger
1414
from .device import VantagePro2
1515

16-
VERSION = '0.3.22'
16+
VERSION = '0.3.23'
1717
__version__ = VERSION

pyvantagepro/device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def read_from_eeprom(self, hex_address, size):
142142
ack = self.link.read(len(self.ACK))
143143
if self.ACK == ack:
144144
LOGGER.info("Check ACK: OK (%s)" % (repr(ack)))
145-
data = self.link.read(size + 2) # 2 bytes for CRC
145+
data = self.link.read(size + 2, binary=True) # 2 bytes for CRC
146146
if VantageProCRC(data).check():
147147
return data[:-2]
148148
else:
@@ -163,7 +163,7 @@ def gettime(self):
163163
'''Returns the current datetime of the console.'''
164164
self.wake_up()
165165
self.send("GETTIME", self.ACK)
166-
data = self.link.read(8)
166+
data = self.link.read(8, binary=True)
167167
return unpack_datetime(data)
168168

169169
def settime(self, dtime):

0 commit comments

Comments
 (0)