Skip to content

Commit 4cac156

Browse files
authored
Merge pull request #851 from pdxlocations/waypoint-icon
add icon parameter to sendWaypoint()
2 parents dcd077d + 9285f7d commit 4cac156

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

examples/waypoint.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
parser_create.add_argument('id', help="id of the waypoint")
2626
parser_create.add_argument('name', help="name of the waypoint")
2727
parser_create.add_argument('description', help="description of the waypoint")
28+
parser_create.add_argument('icon', help="icon of the waypoint")
2829
parser_create.add_argument('expire', help="expiration date of the waypoint as interpreted by datetime.fromisoformat")
2930
parser_create.add_argument('latitude', help="latitude of the waypoint")
3031
parser_create.add_argument('longitude', help="longitude of the waypoint")
@@ -44,6 +45,7 @@
4445
waypoint_id=int(args.id),
4546
name=args.name,
4647
description=args.description,
48+
icon=args.icon,
4749
expire=int(datetime.datetime.fromisoformat(args.expire).timestamp()),
4850
latitude=float(args.latitude),
4951
longitude=float(args.longitude),

meshtastic/mesh_interface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,7 @@ def sendWaypoint(
830830
self,
831831
name,
832832
description,
833+
icon,
833834
expire: int,
834835
waypoint_id: Optional[int] = None,
835836
latitude: float = 0.0,
@@ -848,6 +849,7 @@ def sendWaypoint(
848849
w = mesh_pb2.Waypoint()
849850
w.name = name
850851
w.description = description
852+
w.icon = icon
851853
w.expire = expire
852854
if waypoint_id is None:
853855
# Generate a waypoint's id, NOT a packet ID.

0 commit comments

Comments
 (0)