|
|
|
@ -201,7 +201,10 @@ def adjustSpeed(motor, adjustment):
|
|
|
|
|
global nowTime, stopTime, currentMotor, speed, motorcfg, movement_time, max_speed, max_movement_time
|
|
|
|
|
|
|
|
|
|
if currentMotor==motor:
|
|
|
|
|
if (adjustment>0 and speed>0) or (adjustment<0 and speed<0):
|
|
|
|
|
speed += adjustment * (abs(speed)/max_speed)
|
|
|
|
|
else:
|
|
|
|
|
stopMotorFunctions()
|
|
|
|
|
stopTime += movement_time/2 * max_movement_time/(stopTime - nowTime)
|
|
|
|
|
else:
|
|
|
|
|
currentMotor = motor
|
|
|
|
|