Skip to content

Commit

Permalink
Merge pull request #70 from numat/mmhgvsmbar
Browse files Browse the repository at this point in the history
🪲 fix pressure set point unit conversion
  • Loading branch information
juli4nb4dillo authored Feb 12, 2024
2 parents af21b92 + 702e6df commit 9ebc93c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ika/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ async def get_pressure(self) -> float:
return round(float(raw_pressure) / 1.333, 2)

async def get_pressure_setpoint(self) -> float:
"""Get vacuum pressure setpoint, converting to mmHg."""
"""Get vacuum pressure setpoint, in mmHg."""
raw_sp = await self.query(self.READ_SET_PRESSURE)
return round(float(raw_sp) / 1.333, 2)
return round(float(raw_sp), 2)

async def get_status(self) -> bool:
"""Get vacuum status and convert to running/not running bool.
Expand Down Expand Up @@ -537,7 +537,7 @@ async def set(self, setpoint: float):
Unlike other commands, the vacuum echoes back, so use query().
"""
setpoint_mbar = str(int(setpoint * 1.333))
setpoint_mbar = str(int(setpoint))
await self.query(self.SET_PRESSURE + setpoint_mbar)

async def set_mode(self, mode: VacuumProtocol.Mode):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="ika-control",
version="0.4.0",
version="0.4.1",
description="Python driver for IKA instruments.",
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 9ebc93c

Please sign in to comment.