From 976c15d29a102fcd95758d1a93879f8f934bf692 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 10 Jan 2020 22:11:57 +0100 Subject: [PATCH] parse address as a numeric field --- owrx/pocsag.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/owrx/pocsag.py b/owrx/pocsag.py index afccc79..0d7f750 100644 --- a/owrx/pocsag.py +++ b/owrx/pocsag.py @@ -5,4 +5,6 @@ class PocsagParser(Parser): def parse(self, raw): fields = raw.decode("ascii", "replace").rstrip("\n").split(";") meta = {v[0]: "".join(v[1:]) for v in map(lambda x: x.split(":"), fields) if v[0] != ""} + if "address" in meta: + meta["address"] = int(meta["address"]) self.handler.write_pocsag_data(meta)