Skip to content

Commit

Permalink
docs: tweaked docstrings to be in Google style
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-marshall-amp committed Jul 19, 2024
1 parent dfdf87f commit 0e2b456
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/fixate/drivers/dmm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""
dmm is the digital multimeter driver.
Digital multimeter driver
=========================
Use dmm.open to connect to a connected digital multimeter.
Use `dmm.open()` to connect to a digital multimeter.
Functions are dictated by the abstract superclass ``DMM`` in helper.py
::
Expand All @@ -22,6 +23,11 @@
def open() -> DMM:
"""
Connect to a digital multimeter.
Searches for a configured instrument and returns the first one found.
Returns:
DMM: open connection to the DMM
"""
for DMM in (Fluke8846A, Keithley6500):
instrument = find_instrument_by_id(DMM.REGEX_ID)
Expand Down
12 changes: 9 additions & 3 deletions src/fixate/drivers/dmm/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def remote(self):
def local(self):
"""
Sets instrument to local mode
Use remote() to restore remote operation.
Use `remote()` to restore remote operation.
"""
raise NotImplementedError

Expand All @@ -32,15 +32,21 @@ def measurement(self, delay=None):
"""
Trigger and return measurement from the instrument buffer.
delay: If True, waits for self.measurement_delay seconds then triggers a measurement.
returns: a single value as a float
Args:
delay (bool): If True, waits for `self.measurement_delay` seconds then triggers a measurement.
Returns:
float: measured value
"""
raise NotImplementedError

def voltage_ac(self, _range=None):
"""
Sets the DMM in AC voltage measurement mode and puts it in the range given
by the argument _range. Signals expected to be measured must be < _range.
Args:
_range (???): The range to set the DMM to.
"""
raise NotImplementedError

Expand Down

0 comments on commit 0e2b456

Please sign in to comment.