From 5148f961005e8e4ff8277fc592718e9e38a1d910 Mon Sep 17 00:00:00 2001 From: Theo Sanderson Date: Thu, 23 Jul 2020 19:18:31 +0100 Subject: [PATCH] fix(api): Clarify what is behind GPIO connection problems (#6204) (Only one device can connect at a time). The message displayed when we fail to connect to GPIOs in Jupyter/Python script because another process is already using them doesn't explain that the reason stopping the server works is that it frees up the GPIOs for connecting. This may (or may not) be behind for example #6164. This adds that to the message. --- api/src/opentrons/drivers/rpi_drivers/__init__.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/api/src/opentrons/drivers/rpi_drivers/__init__.py b/api/src/opentrons/drivers/rpi_drivers/__init__.py index 857ee3d0441..b0dd8f67bc5 100755 --- a/api/src/opentrons/drivers/rpi_drivers/__init__.py +++ b/api/src/opentrons/drivers/rpi_drivers/__init__.py @@ -19,10 +19,12 @@ def build_gpio_chardev(chip_name: str) -> 'GPIODriverLike': MODULE_LOG.warning( 'Failed to initialize character device, will not ' 'be able to control gpios (lights, button, smoothie' - 'kill, smoothie reset). If you need to control gpios, ' - 'first stop the robot server with systemctl stop ' - 'opentrons-robot-server. Until you restart the server ' - 'with systemctl start opentrons-robot-server, you will ' - 'be unable to control the robot using the Opentrons app.') + 'kill, smoothie reset). Only one connection can be' + ' made to the gpios at a time. ' + 'If you need to control gpios, first stop the robot ' + 'server with systemctl stop opentrons-robot-server. ' + 'Until you restart the server with systemctl start ' + 'opentrons-robot-server, you will be unable to ' + 'control the robot using the Opentrons app.') from .gpio_simulator import SimulatingGPIOCharDev return SimulatingGPIOCharDev(chip_name)