From 2bb53969d4e725fbdbde8d6b8f54abebb84bf1b1 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 10 Dec 2022 14:47:33 +0700 Subject: [PATCH] solve_skt_drive_issue add absolute to speed FR, FL --- kuukar/kuukar_motion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kuukar/kuukar_motion.py b/kuukar/kuukar_motion.py index c461de7..1f205ac 100644 --- a/kuukar/kuukar_motion.py +++ b/kuukar/kuukar_motion.py @@ -98,8 +98,8 @@ class motion: if rightSpeed>100: rightSpeed=100 elif rightSpeed<-100: rightSpeed= -100 - self.motor_write(MOTOR_FL_F, MOTOR_FL_R, leftSpeed) - self.motor_write(MOTOR_FR_F, MOTOR_FR_R, rightSpeed) + self.motor_write(MOTOR_FL_F, MOTOR_FL_R, abs(leftSpeed)) + self.motor_write(MOTOR_FR_F, MOTOR_FR_R, abs(rightSpeed)) self.motor_write(MOTOR_RL_F, MOTOR_RL_R, speed) self.motor_write(MOTOR_RR_F, MOTOR_RR_R, speed)