PyMoDAQ / pymodaq_plugins_thorlabs

Set of PyMoDAQ plugins for instruments from Thorlabs (Kinesis K10CR1 (stepper rotation actuator), Kinesis Flipper, Kinesis KSP100...)
MIT License
3 stars 27 forks source link

Fixed the Kinesis Flipper module raising some errors #6

Closed LMSC-NTappy closed 2 years ago

LMSC-NTappy commented 2 years ago

Version from main would raise multiple errors preventing initialisation in the Kinesis_Flipper module

2022-03-31 17:39:04,962 - pymodaq.pymodaq.daq_move_main.test - INFO -   File "c:\users\admin\documents\pymodaq_dev\pymodaq_plugins_thorlabs\src\pymodaq_plugins_thorlabs\daq_move_plugins\daq_move_Kinesis_Flipper.py", line 149, in ini_stage
    ser_bool=serialnumbers.Contains(self.settings.child(('serial_number')).value())
'list' object has no attribute 'Contains'
2022-03-31 17:39:04,963 - pymodaq.pymodaq.daq_move_main.test - INFO - Stage initialized: False info:   File "c:\users\admin\documents\pymodaq_dev\pymodaq_plugins_thorlabs\src\pymodaq_plugins_thorlabs\daq_move_plugins\daq_move_Kinesis_Flipper.py", line 149, in ini_stage
    ser_bool=serialnumbers.Contains(self.settings.child(('serial_number')).value())
'list' object has no attribute 'Contains'
2022-03-31 17:57:22,068 - pymodaq.pymodaq.daq_move_main.test.actuator - ERROR - 'DAQ_Move_Kinesis_Flipper' object has no attribute 'Check_position'
Traceback (most recent call last):
  File "c:\users\admin\documents\pymodaq_dev\pymodaq\src\pymodaq\daq_move\daq_move_main.py", line 942, in queue_command
    self.move_Abs(*command.attributes)
  File "c:\users\admin\documents\pymodaq_dev\pymodaq\src\pymodaq\daq_move\daq_move_main.py", line 842, in move_Abs
    pos = self.hardware.move_Abs(position)
  File "c:\users\admin\documents\pymodaq_dev\pymodaq_plugins_thorlabs\src\pymodaq_plugins_thorlabs\daq_move_plugins\daq_move_Kinesis_Flipper.py", line 222, in move_Abs
    pos = self.Check_position()

Both should be corrected with this version

Cheers

Nicolas