diff --git a/cflib/crtp/radiodriver.py b/cflib/crtp/radiodriver.py index 52095ad0..7e8ad3a5 100644 --- a/cflib/crtp/radiodriver.py +++ b/cflib/crtp/radiodriver.py @@ -246,6 +246,7 @@ def __init__(self): self.out_queue = None self._thread = None self.needs_resending = True + self.rate_limit = None def connect(self, uri, link_quality_callback, link_error_callback): """ @@ -260,6 +261,7 @@ def connect(self, uri, link_quality_callback, link_error_callback): devid, channel, datarate, address, rate_limit = self.parse_uri(uri) self.uri = uri + self.rate_limit = rate_limit if self._radio is None: self._radio = RadioManager.open(devid) @@ -383,7 +385,8 @@ def restart(self): self.out_queue, self.link_quality_callback, self.link_error_callback, - self) + self, + self.rate_limit) self._thread.start() def close(self):