From 3affbfecd41f007d9b2604fe8ce110171e46cc71 Mon Sep 17 00:00:00 2001 From: cheetah Date: Tue, 22 Oct 2019 22:38:46 +0200 Subject: [PATCH] Numeric Messages now work --- pocsag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pocsag.py b/pocsag.py index f8d7eae..e1cc0c7 100644 --- a/pocsag.py +++ b/pocsag.py @@ -177,8 +177,8 @@ def encodeASCII(initial_offset, text, buff): # Char Translationtable mirrorTab = [0x00, 0x08, 0x04, 0x0c, 0x02, 0x0a, 0x06, 0x0e, 0x01, 0x09] def encodeDigit(ch): - if ch >= '0' and ch <= '9': - return mirrorTab[ch - '0'] + if ord(ch) >= ord('0') and ord(ch) <= ord('9'): + return mirrorTab[ord(ch) - ord('0')] elif ch == ' ': return 0x03 elif ch == 'u' or ch == 'U':