diff --git a/meshtastic/mesh_interface.py b/meshtastic/mesh_interface.py index c59fcb3..91a8c1f 100644 --- a/meshtastic/mesh_interface.py +++ b/meshtastic/mesh_interface.py @@ -442,7 +442,6 @@ class MeshInterface: # pylint: disable=R0902 latitude: float = 0.0, longitude: float = 0.0, altitude: int = 0, - timeSec: int = 0, destinationId: Union[int, str] = BROADCAST_ADDR, wantAck: bool = False, wantResponse: bool = False, @@ -454,8 +453,6 @@ class MeshInterface: # pylint: disable=R0902 Also, the device software will notice this packet and use it to automatically set its notion of the local position. - If timeSec is not specified (recommended), we will use the local machine time. - Returns the sent packet. The id field will be populated in this packet and can be used to track future message acks/naks. """ @@ -472,11 +469,6 @@ class MeshInterface: # pylint: disable=R0902 p.altitude = int(altitude) logging.debug(f"p.altitude:{p.altitude}") - if timeSec == 0: - timeSec = int(time.time()) # returns unix timestamp in seconds - p.time = timeSec - logging.debug(f"p.time:{p.time}") - if wantResponse: onResponse = self.onResponsePosition else: diff --git a/meshtastic/tests/test_mesh_interface.py b/meshtastic/tests/test_mesh_interface.py index f637c62..21f80c6 100644 --- a/meshtastic/tests/test_mesh_interface.py +++ b/meshtastic/tests/test_mesh_interface.py @@ -185,7 +185,7 @@ def test_sendPosition(caplog): with caplog.at_level(logging.DEBUG): iface.sendPosition() iface.close() - assert re.search(r"p.time:", caplog.text, re.MULTILINE) + # assert re.search(r"p.time:", caplog.text, re.MULTILINE) # TODO