add playground

+ fix SR_7270 communicator

Change-Id: If9604f9a6fe59ca3de3bbdbecf1b5053fce0573e
This commit is contained in:
2023-04-26 13:54:53 +02:00
parent ab1fdbae16
commit 1171245704
4 changed files with 179 additions and 3 deletions

View File

@ -28,7 +28,7 @@ class SR7270(StringIO):
end_of_line = b'\x00'
def communicate(self, command): # remove dash from terminator
reply = StringIO.communicate(self, command)
reply = super().communicate(command)
status = self._conn.readbytes(2, 0.1) # get the 2 status bytes
return reply + ';%d;%d' % tuple(status)