diff --git a/ohmpi/hardware_components/pwr_batt.py b/ohmpi/hardware_components/pwr_batt.py index 205762f2f056aafb75cd87097968d91837d003f9..0616ba943f0f3f6d289855ef03d1bfa4f116c7e2 100644 --- a/ohmpi/hardware_components/pwr_batt.py +++ b/ohmpi/hardware_components/pwr_batt.py @@ -6,6 +6,8 @@ from ohmpi.utils import enforce_specs # hardware characteristics and limitations SPECS = {'model': {'default': os.path.basename(__file__).rstrip('.py')}, 'voltage': {'default': 12., 'max': 12., 'min': 12.}, + 'current_adjustable': {'default': False}, + 'voltage_adjustable': {'default': False} } @@ -17,11 +19,8 @@ class Pwr(PwrAbstract): subclass_init = False else: subclass_init = True - voltage = kwargs.pop('voltage', 12.) super().__init__(**kwargs) - self.voltage_adjustable = False - self._voltage = voltage - self.current_adjustable = False + self._voltage = kwargs['voltage'] self._current = np.nan self._state = 'on' diff --git a/ohmpi/hardware_components/pwr_dps5005.py b/ohmpi/hardware_components/pwr_dps5005.py index b1cd7180bebeb5a5c60bb19b8100f96030de14b1..daf6a7d006caec6ca7eb85f8117e727efb7d464c 100644 --- a/ohmpi/hardware_components/pwr_dps5005.py +++ b/ohmpi/hardware_components/pwr_dps5005.py @@ -9,6 +9,8 @@ from ohmpi.utils import enforce_specs SPECS = {'model': {'default': os.path.basename(__file__).rstrip('.py')}, 'voltage': {'default': 12., 'max': 50., 'min': 0.}, 'current_max': {'default': 100.}, + 'current_adjustable': {'default': False}, + 'voltage_adjustable': {'default': True} } # TODO: Complete this code... handle modbus connection