Skip to content

Commit

Permalink
added todos linked to issue #115
Browse files Browse the repository at this point in the history
  • Loading branch information
JB-Wolf committed Jan 9, 2024
1 parent 17a83a8 commit 934be6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/flowchem/devices/vapourtec/r2_components_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,14 @@ def _change_connections(self, raw_position, reverse: bool = False) -> str:
translated = raw_position
return translated

# todo should not overwrite parent method
async def get_position(self) -> list[list]:
"""Get current valve position."""
position = await self.hw_device.get_valve_position(self.valve_code)
return (self._positions[int(self._change_connections(position, reverse=True))])

async def set_position(self, positions_to_connect):
# todo this should not overwrite parent method
"""Move valve to position, which connects named ports. For example, [[5,0]] or [[2,3]]"""
positions_to_connect_l = json.loads(positions_to_connect)
position_to_connect = tuple(tuple(inner_list) for inner_list in positions_to_connect_l)
Expand All @@ -221,6 +223,7 @@ async def set_position(self, positions_to_connect):
str(self.valve_code * 2 + int(target_pos)),
)
return True

async def get_monitor_position(self) -> str:
"""Get current valve position."""
position = await self.hw_device.get_valve_position(self.valve_code)
Expand Down

0 comments on commit 934be6b

Please sign in to comment.