To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit e39dfd19 authored by Henrik Menne's avatar Henrik Menne
Browse files

Enum got lost during merging

parent 63474a32
Pipeline #53122 passed with stages
in 2 minutes and 56 seconds
......@@ -325,7 +325,7 @@ class LabJack(SingleCommDevice):
def get_digital_input(
self, address: Union[str, labjack.TSeriesDIOChannel]
) -> Union[Literal[0], Literal[1]]:
) -> LabJack.DIOStatus:
"""
Get the value of a digital input.
......@@ -344,13 +344,8 @@ class LabJack(SingleCommDevice):
f"DIO {address.name} is not available for this device type: {dt_name}."
)
ret = int(self.com.read_name(address.name))
if ret == 0:
return self.DIOStatus.LOW
if ret == 1:
return self.DIOStatus.HIGH
# TODO why this way?
#if ret == 0 or ret == 1:
# return self.DIOStatus(ret)
if ret == 0 or ret == 1:
return self.DIOStatus(ret)
raise LabJackIdentifierDIOError(f"Expected 0 or 1 return value, got {ret}.")
class CalMicroAmpere(Enum):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment