Source

puma / MDC.py

Diff from to

File MDC.py

 
 	def moveto(self, count, speed=0):
 		if speed is not None and speed != 0:
-			if speed > 1000:
-				speed = 1000
+			if speed > 4000:
+				speed = 4000
 			if speed < 1:
 				speed = 1
 			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))
 		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("^EPPR " + channel + " 500")
+			self.send("^EPPR " + channel + " 300")
 			time.sleep(0.1)
-			self.send("^KP " + channel + " 2")
+			self.send("^KP " + channel + " 10")
 			time.sleep(0.1)
 			self.send("^KD " + channel + " 0")
 			time.sleep(0.1)
 			self.send("^KI " + channel + " 0")
 			time.sleep(0.1)
-			self.send("!s " + channel + " 100")
+			self.send("!s " + channel + " 1000")
 			time.sleep(0.1)
-			self.send("!ac " + channel + " 2000")
+			self.send("!ac " + channel + " 20000")
 			time.sleep(0.1)
-			self.send("!dc " + channel + " 2000")
+			self.send("!dc " + channel + " 20000")
 			time.sleep(0.1)
 
 		# Configure the telemetry stream