Exemple #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."
Exemple #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."
Exemple #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)
	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)