diff --git a/socs/agents/hi6200/.drivers.py.swm b/socs/agents/hi6200/.drivers.py.swm new file mode 100644 index 000000000..8075acf4a Binary files /dev/null and b/socs/agents/hi6200/.drivers.py.swm differ diff --git a/socs/agents/hi6200/agent.py b/socs/agents/hi6200/agent.py index eaafe217b..ed3cca6c6 100644 --- a/socs/agents/hi6200/agent.py +++ b/socs/agents/hi6200/agent.py @@ -40,18 +40,8 @@ def init(self, session, params=None): if not acquired: return False, "Could not acquire lock" - -<< << << < HEAD self.scale = Hi6200Interface(self.ip_address, self.tcp_port) -== == == = - try: - self.scale = Hi6200Interface(self.ip_address, self.tcp_port) - - except BaseException: - self.log.error(f"Some unknown error occurred initializing TCP Server") - return False, "TCP Failure" ->>>>>> > refs / remotes / origin / add_Hi6200_Agent self.log.info("Connected to scale.") return True, 'Initialized Scale.' @@ -80,10 +70,6 @@ def monitor_weight(self, session, params=None): } try: -<<<<<<< HEAD -======= - ->>>>>>> refs/remotes/origin/add_Hi6200_Agent data['data']["Gross"] = self.scale.read_scale_gross_weight() data['data']["Net"] = self.scale.read_scale_net_weight() @@ -93,10 +79,6 @@ def monitor_weight(self, session, params=None): session.data = data except ValueError as e: -<<<<<<< HEAD -======= - ->>>>>>> refs/remotes/origin/add_Hi6200_Agent self.log.error(f"Scale responded with an anomolous number, ignorning: {e}") except AttributeError as e: diff --git a/socs/agents/hi6200/drivers.py b/socs/agents/hi6200/drivers.py index c706ee2bb..643d5f95a 100644 --- a/socs/agents/hi6200/drivers.py +++ b/socs/agents/hi6200/drivers.py @@ -1,20 +1,11 @@ import struct - -<< << << < HEAD -== == == = from pyModbusTCP.client import ModbusClient ->>>>>> > refs / remotes / origin / add_Hi6200_Agent - class Hi6200Interface(): """ The Hi6200 Weight Processor uses a Modbus TCP Interface to communicate. -<<<<<<< HEAD -======= - ->>>>>>> refs/remotes/origin/add_Hi6200_Agent The Gross and Net weight sensors are always available to read on the 8,9 and 6,7 registers respectively. """ @@ -22,10 +13,6 @@ def __init__(self, ip_address, tcp_port, verbose=False, **kwargs): """ Connects to the Hi6200 weight sensor using a TCP Modbus Client with pyModbusTCP. This works ~similarly to a socket connection using a IP and port. -<<<<<<< HEAD -======= - ->>>>>>> refs/remotes/origin/add_Hi6200_Agent ModbusClient will not throw errors upon incorrect ip_address! ModbusClient will also allow multiple recconects unlike a socket. """