diff --git a/adafruit_rfm69.py b/adafruit_rfm69.py index b8ec63b..9eeed7e 100644 --- a/adafruit_rfm69.py +++ b/adafruit_rfm69.py @@ -474,8 +474,10 @@ def operation_mode(self, val): op_mode |= val << 2 self._write_u8(_REG_OP_MODE, op_mode) # Wait for mode to change by polling interrupt bit. + start = time.monotonic() while not self.mode_ready: - pass + if (time.monotonic() - start) >= 1: + raise TimeoutError("Operation Mode failed to set.") @property def sync_word(self):