diff --git a/README.md b/README.md index 822fd85..be5c9a4 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ ### Install dependencies 1. Clone the repository and checkout the develop branch (default) -1. Install dependencies with `pip install -r requirements.txt` (can be in virtualenv) +1. Install Python 3 +1. Install dependencies with `pip3 install -r requirements.txt` (can be in virtualenv) 1. Install `pyqt5-tools` Global or user python installation (not virtualenv) ### Editing the `.ui` files diff --git a/requirements.txt b/requirements.txt index 3d406d7..31aaa5f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,9 @@ -pymodbus==1.5.1 -PyQt5==5.10.1 -pyserial==3.4 -sip==4.19.8 -six==1.11.0 +packaging==20.8 +pymodbus==2.4.0 +pyparsing==2.4.7 +PyQt5==5.15.2 +PyQt5-sip==12.8.1 +pyserial==3.5 +sip==6.0.0 +six==1.15.0 +toml==0.10.2 diff --git a/visualizer/modbus_worker.py b/visualizer/modbus_worker.py index 676c6cd..7d5c048 100644 --- a/visualizer/modbus_worker.py +++ b/visualizer/modbus_worker.py @@ -46,13 +46,13 @@ def configure_client(self, settings): if self.client: self.client.close() # Properly close the client when re-configuring. Needed for Serial. - if settings["network_type"] is "tcp": + if settings["network_type"] == "tcp": host = settings["host"] port = settings["port"] self.client = ModbusTcpClient(host, port) self.console_message_available.emit(f"Attempting to connect to {host} on port {port}") - elif settings["network_type"] is "serial": + elif settings["network_type"] == "serial": port = settings["port"] protocol = settings["protocol"] baudrate = settings["baudrate"] diff --git a/visualizer/utils.py b/visualizer/utils.py index 5b6cc09..d4ce265 100644 --- a/visualizer/utils.py +++ b/visualizer/utils.py @@ -100,7 +100,7 @@ def format_write_value(string, dtype='H', byte_order='>', word_order='>'): num_txt = string[1:] radix = RADIX_PREFIX.get(num_txt[:2], 10) - if radix is not 10: + if radix != 10: num_txt = string[2:] vals = []