From 7333ccd7a6218f6f5a7c0d0cb8b3ccbcb73cf4e4 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Mon, 23 Oct 2023 15:51:03 +0200 Subject: [PATCH] implement pfeiffer TPG vacuum reading this is an example where StringIO.communicate has to be extended Change-Id: Iff6bb426ee7960904993574531de84793152e21d Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/32385 Tested-by: Jenkins Automated Tests Reviewed-by: Enrico Faulhaber Reviewed-by: Markus Zolliker --- frappy_psi/pfeiffer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frappy_psi/pfeiffer.py b/frappy_psi/pfeiffer.py index 2511ef4..5a9e09f 100644 --- a/frappy_psi/pfeiffer.py +++ b/frappy_psi/pfeiffer.py @@ -18,7 +18,7 @@ # ***************************************************************************** """pfeiffer TPG vacuum pressure reading""" -from frappy.core import StringIO, HasIO, Command, StringType, IntRange, \ +from frappy.core import StringIO, HasIO, IntRange, \ IDLE, WARN, ERROR, Readable, Parameter, Property from frappy.errors import CommunicationFailedError @@ -43,7 +43,7 @@ class IO(StringIO): class Pressure(HasIO, Readable): value = Parameter(unit='mbar') - channel = Property('channel number', IntRange(1,2), default=1) + channel = Property('channel number', IntRange(1, 2), default=1) STATUS_MAP = { '0': (IDLE, ''), @@ -56,7 +56,7 @@ class Pressure(HasIO, Readable): } ioClass = IO - + def read_value(self): reply = self.communicate(f'PR{self.channel}') status, strvalue = reply.split(',')