Smaller software tweaks

This commit is contained in:
Sebastian 2016-10-26 17:19:45 +02:00
parent 0283fa079d
commit cf9c945fb6
1 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class SSS7Bus(object):
self._debug("Timeout reading length byte")
return False
length = ord(length_byte) - 1 # we read the size length byte already
length = ord(length_byte) + 2 # Payload length + 2 byte CRC16
self._serial.timeout = timeout=self._bit_time * TIMEOUT
@ -139,7 +139,7 @@ class SSS7Bus(object):
crc16.update(msg)
msg_crc = crc16.digest()
frame = chr(0xAA) + chr(0xFE) + chr(len(msg) + 3) + msg + msg_crc
frame = chr(0xAA) + chr(0xFE) + chr(len(msg)) + msg + msg_crc
result = self._send_frame(frame)