From c0ef73ab61a866f301274458779a9df2dc2bfd5c Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Wed, 24 Mar 2021 10:35:48 +0800 Subject: [PATCH] fix simpleN encodings --- meshtastic/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 332da4f..8f6ac01 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -75,7 +75,7 @@ def fromPSK(valstr): elif valstr == "default": return bytes([1]) # Use default channel psk elif valstr.startswith("simple"): - return bytes([int(valstr[6:])]) # Use one of the single byte encodings + return bytes([int(valstr[6:]) + 1]) # Use one of the single byte encodings else: return fromStr(valstr)