From 459ec0dee13a103541a8b5fd2207c8b39254012e Mon Sep 17 00:00:00 2001 From: chrisruk Date: Wed, 6 Jan 2021 15:33:07 +0000 Subject: [PATCH] get abs pos, from correct index --- buildhat/motors.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buildhat/motors.py b/buildhat/motors.py index 8d635bc..c036804 100644 --- a/buildhat/motors.py +++ b/buildhat/motors.py @@ -92,7 +92,12 @@ def get_position(self): return self._motor.get()[2] def get_aposition(self): - return self._motor.get()[3] + """Gets absolute position of motor + + :return: Absolute position of motor + :rtype: int + """ + return self._motor.get()[1] def get_speed(self): """Gets speed of motor