From 79a7939fd855b7d0c9a2699541de4be71fc8cdb9 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sat, 13 Jul 2024 18:17:18 -0400 Subject: flake9 linter satisfaction --- qolab/hardware/daq/labjack_ue9.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'qolab/hardware') diff --git a/qolab/hardware/daq/labjack_ue9.py b/qolab/hardware/daq/labjack_ue9.py index bab2fc9..1c0394d 100644 --- a/qolab/hardware/daq/labjack_ue9.py +++ b/qolab/hardware/daq/labjack_ue9.py @@ -1,11 +1,13 @@ -from qolab.hardware.basic import BasicInstrument from qolab.hardware.daq import DAQ import ue9 class LabJackUE9(DAQ): """ - This custom modification of the stock LabJack UE9 class provided by LabJack as ue9 + DAQ LabJack UE9 class. + + This is custom modification of the stock ue9 class + provided by LabJack. """ def __init__( @@ -48,12 +50,12 @@ class LabJackUE9(DAQ): def setDAC(self, chNum, volts): """set digital to analog (DAC) output voltage""" - if chNum == None or volts == None: + if (chNum is None) or (volts is None): print("setOutputCh needs chNum and volts to be set") return 0 bits = self.daq.voltageToDACBits(volts, dacNumber=chNum) - # out is completely bogus for DAC settings in UE9 - out = self.daq.singleIO(IOType=5, Channel=chNum, DAC=bits) + # results are completely bogus for DAC settings in UE9 + self.daq.singleIO(IOType=5, Channel=chNum, DAC=bits) return volts def close(self): -- cgit v1.2.3