Index: __init__.py ================================================================== --- __init__.py +++ __init__.py @@ -314,13 +314,10 @@ if reg & 0x80 == 0x80: self._debug(" regRead[%02X] = %s" % ((reg & 0x7f), result)) else: self._debug("regWrite[%02X:0x%02X%02X] = %s" % (reg, high, low, result)) - #if reg & 0x80 != 0x80: - # time.sleep(delay / 1000.0) - return result def put_register(self, reg, value): high = (value >> 8) & 0xff low = value & 0xff @@ -491,20 +488,21 @@ radio_status = self.get_register_bits('status') self._debug("radio_status={}".format(radio_status)) if radio_status['packet_flag'] == 1: break - time.sleep(0.1) + time.sleep(0.001) return True def multi_transmit(self, message, channels, retries = 3, delay = 0.1): for channel in channels: for i in range(retries): if not self.transmit(message, channel): return False - time.sleep(delay / retries) + if delay != 0: + time.sleep(delay / retries) return True def start_listening(self, channel): # Initialize the receiver self.stop_listening()