Skip to content

Commit

Permalink
Merge 24a6ac9 into 94b89a6
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmitchell3 committed Apr 4, 2018
2 parents 94b89a6 + 24a6ac9 commit 9c041a2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions aprslib/parsing/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,21 @@ def parse_header(head):
return parsed


def remove_WIDEn_N(path):
"""
Remove WIDEn-N entries and * markers from path, leaving only digi names
path: path of parsed packet (list of strings)
returns: list of digipeaters that digipeated packet, in order
"""
digipath = []
for digi in path:
digi = re.sub('\*','',digi) # Get rid of * markers
if not re.match('WIDE[0-9]-*[0-9]*',digi): # check for not WIDEn-N
digipath.append(digi)

return digipath


def parse_timestamp(body, packet_type=''):
parsed = {}

Expand Down

0 comments on commit 9c041a2

Please sign in to comment.