예제 #1
0
 def ChangeBaudrate(self, baudrate):
     """Change the baudrate, reset the device and reopen communication."""
     self.GoToConfig()
     brid = Baudrates.get_BRID(baudrate)
     bridAck = self.SetBaudrate(brid)
     if bridAck:  # Testing if the BR was set correctly
         self.device.baudrate = baudrate
         print "Baudrate set to %d bps" % baudrate
         time.sleep(0.01)
     else:
         print "NOK:Baudrate not configured."
예제 #2
0
	def ChangeBaudrate(self, baudrate):
		"""Change the baudrate, reset the device and reopen communication."""
		self.GoToConfig()
		brid = Baudrates.get_BRID(baudrate)
		bridAck = self.SetBaudrate(brid)
		if bridAck: # Testing if the BR was set correctly
			self.device.baudrate=baudrate
			print "Baudrate set to %d bps"%baudrate
			time.sleep(0.01)
		else:
			print "NOK:Baudrate not configured."
예제 #3
0
 def ChangeBaudrate(self, baudrate):
     """Change the baudrate, reset the device and reopen communication."""
     self.GoToConfig()
     brid = Baudrates.get_BRID(baudrate)
     self.SetBaudrate(brid)
     self.Reset()
     #self.device.flush()
     self.device.baudrate = baudrate
     #self.device.flush()
     time.sleep(0.01)
     self.read_msg()
     self.write_msg(0x3f)
예제 #4
0
	def ChangeBaudrate(self, baudrate):
		"""Change the baudrate, reset the device and reopen communication."""
		self.GoToConfig()
		brid = Baudrates.get_BRID(baudrate)
		self.SetBaudrate(brid)
		self.Reset()
		#self.device.flush()
		self.device.baudrate=baudrate
		#self.device.flush()
		time.sleep(0.01)
		self.read_msg()
		self.write_msg(0x3f)