Skip to content

Commit

Permalink
Fixing volage misspelling (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
thirtytwobits committed Nov 20, 2019
1 parent c0f46e8 commit 6b1a26b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions src/nanaimo/instruments/bkprecision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ async def on_gather(self, args: nanaimo.Namespace) -> nanaimo.Artifacts:
return artifacts

def is_volage_above_on_threshold(self, voltage: float) -> bool:
"""
Deprecated misspelling. See :meth:`is_voltage_above_on_threshold`
for correct method.
"""
return self.is_voltage_above_on_threshold(voltage)

def is_voltage_above_on_threshold(self, voltage: float) -> bool:
"""
Return if a given voltage is above the configured threshold for the
high/on/rising voltage for this fixture.
Expand All @@ -165,6 +172,12 @@ def is_volage_above_on_threshold(self, voltage: float) -> bool:
return (True if voltage > rising_threshold_voltage else False)

def is_volage_below_off_threshold(self, voltage: float) -> bool:
"""
Deprecated misspelling. See :meth:`is_voltage_below_off_threshold` for correct method.
"""
return self.is_voltage_above_on_threshold(voltage)

def is_voltage_below_off_threshold(self, voltage: float) -> bool:
"""
Return if a given voltage is below the configured threshold for the
low/off/falling voltage for this fixture.
Expand Down Expand Up @@ -294,10 +307,10 @@ async def _wait_for_voltage(self,
display_tuple, result = await self._get_display(uart, command_timeout)
voltage = display_tuple[0]
if result == 0:
if is_rising and self.is_volage_above_on_threshold(voltage):
if is_rising and self.is_voltage_above_on_threshold(voltage):
self.logger.debug('---------------POWER SUPPLY UP----------------')
break
elif not is_rising and self.is_volage_below_off_threshold(voltage):
elif not is_rising and self.is_voltage_below_off_threshold(voltage):
self.logger.debug('--------------POWER SUPPLY DOWN---------------')
break
await asyncio.sleep(.01)
Expand Down
2 changes: 1 addition & 1 deletion src/nanaimo/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
# nanaimo (@&&&&####@@*
#

__version__ = '0.0.53'
__version__ = '0.0.54'

__license__ = 'MIT'

0 comments on commit 6b1a26b

Please sign in to comment.