Skip to content

Commit 2d88d8e

Browse files
committed
Good lawd I did that in a hurry
1 parent fb48fc2 commit 2d88d8e

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

meshtastic/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,17 +465,17 @@ def onConnected(interface):
465465
if args.backup_prefs:
466466
closeNow = True
467467
waitForAckNak = True
468-
interface.getNode(args.dest, False, **getNode_kwargs).re(args.backup_preferences)
468+
interface.getNode(args.dest, False, **getNode_kwargs).backup_preferences(args.backup_preferences)
469469

470470
if args.restore_prefs:
471471
closeNow = True
472472
waitForAckNak = True
473-
interface.getNode(args.dest, False, **getNode_kwargs).re(args.backup_preferences)
473+
interface.getNode(args.dest, False, **getNode_kwargs).restore_prefs(args.restore_prefs)
474474

475475
if args.remove_backup_prefs:
476476
closeNow = True
477477
waitForAckNak = True
478-
interface.getNode(args.dest, False, **getNode_kwargs).re(args.remove_backup_preferences)
478+
interface.getNode(args.dest, False, **getNode_kwargs).remove_backup_preferences(args.remove_backup_preferences)
479479

480480
if args.set_ignored_node:
481481
closeNow = True

meshtastic/node.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,9 @@ def setFavorite(self, nodeId: Union[int, str]):
707707
onResponse = self.onAckNak
708708
return self._sendAdmin(p, onResponse=onResponse)
709709

710-
def backupPreferences(self, location: Optional[int] = 0):
710+
def backupPreferences(self, location: Optional[admin_pb2.AdminMessage.BackupLocation.ValueType] = 0):
711711
"""Tell the node to backup preferences to flash."""
712+
print(f"Backing up preferences to location {location}")
712713
self.ensureSessionKey()
713714

714715
p = admin_pb2.AdminMessage()
@@ -720,7 +721,7 @@ def backupPreferences(self, location: Optional[int] = 0):
720721
onResponse = self.onAckNak
721722
return self._sendAdmin(p, onResponse=onResponse)
722723

723-
def restorePreferences(self, location: Optional[int] = 0):
724+
def restorePreferences(self, location: Optional[admin_pb2.AdminMessage.BackupLocation.ValueType] = 0):
724725
"""Tell the node to restore preferences from backup."""
725726
self.ensureSessionKey()
726727

@@ -733,7 +734,7 @@ def restorePreferences(self, location: Optional[int] = 0):
733734
onResponse = self.onAckNak
734735
return self._sendAdmin(p, onResponse=onResponse)
735736

736-
def removePreferencesBackups(self, location: Optional[int] = 0):
737+
def removePreferencesBackups(self, location: Optional[admin_pb2.AdminMessage.BackupLocation.ValueType] = 0):
737738
"""Tell the node to remove backup preferences from the filesystem."""
738739
self.ensureSessionKey()
739740

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "meshtastic"
3-
version = "2.6.0"
3+
version = "2.6.0a1"
44
description = "Python API & client shell for talking to Meshtastic devices"
55
authors = ["Meshtastic Developers <[email protected]>"]
66
license = "GPL-3.0-only"

0 commit comments

Comments
 (0)