From 85f8015c2f14ce2cd75aa93848e04270662be8c6 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Wed, 26 Aug 2020 13:46:29 +0200 Subject: [PATCH] debug output --- snippets/snippet1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snippets/snippet1.py b/snippets/snippet1.py index 73da00d..238790f 100644 --- a/snippets/snippet1.py +++ b/snippets/snippet1.py @@ -126,6 +126,8 @@ class MeterbusSerial(object): while (state not in [MeterbusResponseStates.DONE, MeterbusResponseStates.ERROR]): c = port.read() + print("State {}, Octet {}".format(state, c)) + if state == MeterbusResponseStates.START1: if c == 0x68: frameData.append(c) @@ -198,7 +200,7 @@ class MeterbusSerial(object): print(frame['userdata']) return frame - +