Skip to content
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

Closed
wants to merge 43 commits into from
Closed

Bv platform #116

wants to merge 43 commits into from

Conversation

samuelvitorsaraiva
Copy link
Collaborator

get features from bv

# 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
async def my_task():
logger.debug("Running repeated task...")
await task()
seconds_delay, task = repeated_tasks
Copy link
Collaborator Author

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

Copy link
Contributor

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
Copy link
Collaborator Author

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?

Copy link
Contributor

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":
Copy link
Collaborator Author

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.

Copy link
Contributor

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
Copy link
Collaborator Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@@ -14,10 +14,28 @@


class FlowchemDeviceListener(FlowchemCommonDeviceListener):
def _save_device_info(self, zc: Zeroconf, type_: str, name: str) -> None:
"""
creat
Copy link
Collaborator Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as below

Returns:

"""
zc_info = zc.get_service_info(type_, name)
Copy link
Collaborator Author

@samuelvitorsaraiva samuelvitorsaraiva May 14, 2024

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.

Copy link
Contributor

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:
Copy link
Collaborator Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants