diff --git a/dronekit/__init__.py b/dronekit/__init__.py index 4f3613906..132dc6b65 100644 --- a/dronekit/__init__.py +++ b/dronekit/__init__.py @@ -1381,12 +1381,9 @@ def listener(self, name, msg): self._logger.info('...link restored.') self._heartbeat_timeout = False - self._last_heartbeat = None - @handler.forward_loop def listener(_): if self._heartbeat_lastreceived: - self._last_heartbeat = monotonic.monotonic() - self._heartbeat_lastreceived self.notify_attribute_listeners('last_heartbeat', self.last_heartbeat) @property @@ -1424,7 +1421,7 @@ def listener(self, attr_name, value): parameter passed to the :py:func:`connect() ` function. """ - return self._last_heartbeat + return monotonic.monotonic() - self._heartbeat_lastreceived def on_message(self, name): """