Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions meshtastic/mesh_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ def sendPosition(
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,
Expand All @@ -454,8 +453,6 @@ def sendPosition(
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.
"""
Expand All @@ -472,11 +469,6 @@ def sendPosition(
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:
Expand Down
2 changes: 1 addition & 1 deletion meshtastic/tests/test_mesh_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down