From dd7f909ee24afa7b3f9184d2f6cea925acbc553e Mon Sep 17 00:00:00 2001 From: Samuel Tardieu <sam@rfc1149.net> Date: Fri, 12 Jul 2024 08:23:54 +0200 Subject: [PATCH] Return a value instead of a 1-tuple for who_am_i --- controller/python/controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/python/controller.py b/controller/python/controller.py index a3a2f71..05fe857 100644 --- a/controller/python/controller.py +++ b/controller/python/controller.py @@ -31,7 +31,7 @@ class Controller: def who_am_i(self) -> int: """Check that the motors controller board is present. This should return the same value as Controller.I2C_ADDR.""" - return self._read(self.WHO_AM_I, 1, "B") + return self._read(self.WHO_AM_I, 1, "B")[0] def set_max_percentage(self, percent: float): """Set the maximum percentage of power which will be used -- GitLab