QMAPP-mq / qudi

A modular laboratory experiment management suite.
GNU General Public License v3.0
4 stars 0 forks source link

obis com port should be loaded from the config #35

Closed mvbnano closed 6 years ago

mvbnano commented 6 years ago

What is affected by this bug?

When using the obis laser, the com port used for USB communication is hard coded into the hardware module.

When does this occur?

In on_activate.

Where on the platform does it happen?

Obis hardware module.

How do we replicate the issue?

You cannot guarantee that the obis will always connect to COM3

Expected behavior (i.e. solution)

Read which com port to connect to from the config file.

Other Comments

    def on_activate(self):
        """ Activate module.
        """
        self.obis = serial.Serial('COM3', timeout=1)

        connected = self.connect_laser()

        if not connected:
            self.log.error('Laser does not seem to be connected.')
            return -1
        else:
            self._model_name = self._communicate('SYST:INF:MOD?')
            return 0
mvbnano commented 6 years ago

branch dev_obis_laser restarted for this issue

mvbnano commented 6 years ago

this fix is complete, however, i'd like to have another look through obis before putting another pull request in

mvbnano commented 6 years ago

PR submitted.