1. Trammell Hudson
  2. puma

Source

puma / MDC.py

Diff from to

File MDC.py

 		if delta < 0:
 			delta = -delta
 		if ms != 0:
-			moveto(i+1, new_pos, delta * 1000 / ms + 1)
+			moveto(i+1, new_pos, delta * 200 / ms + 1)
 		else:
 			moveto(i+1, new_pos, 0)
 
 	def moveto(self, count, speed=0):
 		if speed is not None and speed != 0:
 			limited = ''
-			if speed > 40000:
-				speed = 40000
+			if speed > 4000:
+				speed = 4000
 				limited = ' !!!'
-			if speed < 10:
-				speed = 10
+			if speed < 1:
+				speed = 1
 				limited = ' !'
 			self.mdc.send("!S " + self.channel + " " + str(int(speed)))
+		if count < -30000:
+			count = -30000
+		elif count > 30000:
+			count = +30000
+
 		print str(self.axis) + ": " + str(int(count)) + " @ " + str(int(speed)) + limited
 		self.mdc.send("!P " + self.channel + " " + str(int(count)))
 		commands[int(self.axis)] = count
 		for channel in ['1','2']:
 			self.send("^CLERD " + channel + " 0")
 			time.sleep(0.1)
-			self.send("^KP " + channel + " 15")
+			self.send("^EPPR " + channel + " 300")
 			time.sleep(0.1)
-			self.send("^KD " + channel + " 5")
+			self.send("^KP " + channel + " 10")
 			time.sleep(0.1)
-			self.send("^KI " + channel + " 1")
+			self.send("^KD " + channel + " 0")
 			time.sleep(0.1)
-			self.send("!s " + channel + " 4000")
+			self.send("^KI " + channel + " 0")
 			time.sleep(0.1)
-			self.send("!ac " + channel + " 60000")
+			self.send("!s " + channel + " 1000")
 			time.sleep(0.1)
-			self.send("!dc " + channel + " 60000")
+			self.send("!ac " + channel + " 15000")
+			time.sleep(0.1)
+			self.send("!dc " + channel + " 15000")
 			time.sleep(0.1)
 
 		# Configure the telemetry stream