From ec1bf540e6238799485a1e52a74ffb1e3cb7fbef Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 10 Dec 2022 15:05:27 +0700 Subject: [PATCH] Update kuukar_motion.py --- kuukar/kuukar_motion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kuukar/kuukar_motion.py b/kuukar/kuukar_motion.py index 1f205ac..20c1d49 100644 --- a/kuukar/kuukar_motion.py +++ b/kuukar/kuukar_motion.py @@ -97,6 +97,8 @@ class motion: elif leftSpeed<-100: leftSpeed= -100 if rightSpeed>100: rightSpeed=100 elif rightSpeed<-100: rightSpeed= -100 + if speed>100: speed=100 + elif speed<-100: speed= -100 self.motor_write(MOTOR_FL_F, MOTOR_FL_R, abs(leftSpeed)) self.motor_write(MOTOR_FR_F, MOTOR_FR_R, abs(rightSpeed))