Python LT8900 via SPI

Diff
Login

Diff

Differences From Artifact [5bb68ba2bd]:

To Artifact [db9b618ade]:


499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518

			if radio_status['packet_flag'] == 1:
				break
			time.sleep(0.1)

		return True

	def multi_transmit(self, message, channels, retries = 3):
		for i in range(retries):
			for channel in channels:
				if not self.transmit(message, channel):
					return False
				time.sleep(0.1 / retries)
		return True

	def start_listening(self, channel):
		# Initialize the receiver
		self.put_register_bits('radio_state', {
			'tx_enabled': 0,
			'rx_enabled': 0,







|




|







499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518

			if radio_status['packet_flag'] == 1:
				break
			time.sleep(0.1)

		return True

	def multi_transmit(self, message, channels, retries = 3, delay = 0.1):
		for i in range(retries):
			for channel in channels:
				if not self.transmit(message, channel):
					return False
				time.sleep(delay / retries)
		return True

	def start_listening(self, channel):
		# Initialize the receiver
		self.put_register_bits('radio_state', {
			'tx_enabled': 0,
			'rx_enabled': 0,