Skip to content

Commit

Permalink
Divide rank by passrank to equalise finders.
Browse files Browse the repository at this point in the history
Also new finder for ITV.
  • Loading branch information
ali1234 committed Feb 23, 2012
1 parent 6de511e commit d5a5f2b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions finders.py
Expand Up @@ -111,7 +111,7 @@ def find(self, packet):
if self.r == self.row:
rank += 5
rank += self.calculaterank(self.packet&0x7f)
return rank if (rank > self.passrank) else 0
return rank/self.passrank if (rank > self.passrank) else 0

def fixup(self):
self.packet[0:2] = makemrag(self.m, self.row)
Expand Down Expand Up @@ -147,6 +147,10 @@ def check_page_info(self):
"HHHHHHHHHHeeeeeeemhheeDAYe39eMONee"+"29e59e59",
name="BBC Old Packet 0", row=0)

Central = Finder(" Central 217 Wed 25 Dec 18:29/53",
"HHHHHHHHHHeeeeeeeppmhhpDAYp39pMONp29e59p59",
name="Central Packet 0", row=0)

TeletextLtd = Finder(" \x04\x1d\x03Teletext\x07 \x1c100 May05\x0318:29:53",
"HHHHHHHHHHe"+"e"+"e"+"eeeeeeeee"+"ee"+"mhheMON39e"+"29e59e59",
name="Teletext Ltd Packet 0", row=0)
Expand All @@ -155,7 +159,7 @@ def check_page_info(self):
"HHHHHHHHHHeeeeeemhheDAYe39eMONe"+"eee"+"29e59e59",
name="4Tel Packet 0", row=0)

all_headers = [BBC, BBCOld, TeletextLtd, FourTel]
all_headers = [BBC, BBCOld, Central, TeletextLtd, FourTel]

# there are two types of broadcast packet. one has 8/4 PDC data and the other
# has no encoding (not even parity). the latter is almost impossible to
Expand Down

0 comments on commit d5a5f2b

Please sign in to comment.