-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bv platform #116
Bv platform #116
Conversation
# Conflicts: # src/flowchem/devices/hamilton/ml600.py # src/flowchem/devices/hamilton/ml600_pump.py # src/flowchem/devices/hamilton/ml600_valve.py # src/flowchem/devices/harvardapparatus/elite11.py # src/flowchem/devices/knauer/knauer_finder.py
… created for both right and left ml600 valve
…move initialize the syringe (again)
…tion to avoid blocking
…done in broadcast all devices by pumpIO
…check valve is busy or not
async def my_task(): | ||
logger.debug("Running repeated task...") | ||
await task() | ||
seconds_delay, task = repeated_tasks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this changes behaviour and is not in line with type annotation. check, explain and fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repeated_tasks is not iterable
@@ -229,7 +229,7 @@ def __init__(self, name: str, hw_device: R2, pump_code: int) -> None: | |||
super().__init__(name, hw_device) | |||
self.pump_code = pump_code | |||
|
|||
async def read_pressure(self, units: str = "mbar") -> int | None: # mbar | |||
async def read_pressure(self, units: str = "mbar") -> int | float | None: # mbar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be float | None:
Can pressure be int in some moment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pressure in r2 is float, please assist to delete the int
@@ -45,7 +45,7 @@ async def get_device_type(ip_address: str) -> str: | |||
return "ConnectionError" | |||
except asyncio.TimeoutError: | |||
if ip_address == "192.168.1.2": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I think you have to use logged to show it in the terminal. You can change the phrase, too. It could be more evident that the ip_address is/is not 192.168.1.2 and what it means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the 192.169.1.2 normally assign as the static IP to FlowIR (at least in my computer), please check and delete it
@@ -375,6 +375,7 @@ async def infuse(self): | |||
await self._transmit_and_parse_reply(PUMP_ON) | |||
self._running = True | |||
logger.info("Pump started!") | |||
return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be good to declare the return, I mean -> bool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
src/flowchem/client/client.py
Outdated
@@ -14,10 +14,28 @@ | |||
|
|||
|
|||
class FlowchemDeviceListener(FlowchemCommonDeviceListener): | |||
def _save_device_info(self, zc: Zeroconf, type_: str, name: str) -> None: | |||
""" | |||
creat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can explain better what this class does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as below
src/flowchem/client/client.py
Outdated
Returns: | ||
|
||
""" | ||
zc_info = zc.get_service_info(type_, name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this variable (zc_info)? You do not use it anywhere; it is not an attribute either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry this a wrong commit I did, it can be delete
from flowchem.devices.hamilton.ml600_valve import ML600Valve | ||
from flowchem.utils.exceptions import InvalidConfigurationError | ||
from flowchem.devices.hamilton.ml600_valve import ML600LeftValve, ML600RightValve | ||
from flowchem.utils.exceptions import InvalidConfigurationError, DeviceError | ||
from flowchem.utils.people import dario, jakob, wei_hsin | ||
|
||
if TYPE_CHECKING: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to understand it (TYPE_CHECKING).
get features from bv