PyFixate / Fixate

Framework for hardware test fixtures and automatic test environments
MIT License
22 stars 17 forks source link

DMM Diode mode is broken #83

Closed pazzarpj closed 5 years ago

pazzarpj commented 5 years ago

DMM diode mode sets

 def _build_mode_string(self):
        """
        Creates list of configuration strings and combines into a single string
        return: Configuration string
        """
        build_list = [self._modes.get(self._mode, ""), self._range_string, self._rtd_type,
                      self._diode_str]
        build_string = " ".join([x for x in build_list if x != ''])

        return build_string

Once diode_str is set, all future commands break as it isn't cleared. Same with rtd_type.

Diode mode also needs a comma between the two commands.

def diode(self, low_current=True, high_voltage=False):
        """
        Writes configuration string for diode to the DMM
        param _range: value set for the range
        param _resolution: value set for the resolution
        """
        self._diode_str = "{} {}".format(int(bool(low_current)), int(bool(high_voltage)))
        self._set_measurement_mode('diode')

needs to be

        self._diode_str = "{}, {}".format(int(bool(low_current)), int(bool(high_voltage)))