Skip to content

Commit

Permalink
Merge pull request #694 from ianmcorvidae/configure-fixed-position
Browse files Browse the repository at this point in the history
Use dedicated fixed position admin message for --configure
  • Loading branch information
ianmcorvidae authored Oct 16, 2024
2 parents a43dd20 + 1013696 commit 12fd29b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions meshtastic/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,19 +631,15 @@ def onConnected(interface):

if "alt" in configuration["location"]:
alt = int(configuration["location"]["alt"] or 0)
localConfig.position.fixed_position = True
print(f"Fixing altitude at {alt} meters")
if "lat" in configuration["location"]:
lat = float(configuration["location"]["lat"] or 0)
localConfig.position.fixed_position = True
print(f"Fixing latitude at {lat} degrees")
if "lon" in configuration["location"]:
lon = float(configuration["location"]["lon"] or 0)
localConfig.position.fixed_position = True
print(f"Fixing longitude at {lon} degrees")
print("Setting device position")
interface.sendPosition(lat, lon, alt)
interface.localNode.writeConfig("position")
interface.localNode.setFixedPosition(lat, lon, alt)

if "config" in configuration:
localConfig = interface.getNode(args.dest, **getNode_kwargs).localConfig
Expand Down

0 comments on commit 12fd29b

Please sign in to comment.