rotated base91 telemetry bits in output; v0.6.35
The least significant bit is now at the begining. This makes accessing the char array more intuative as the first bit will be first in the array (e.g. bits[0] instead of bits[7])
This commit is contained in:
parent
feb031d587
commit
e0a71de244
|
|
@ -37,7 +37,7 @@ from datetime import date as _date
|
|||
__date__ = str(_date.today())
|
||||
del _date
|
||||
|
||||
__version__ = "0.6.34"
|
||||
__version__ = "0.6.35"
|
||||
__author__ = "Rossen Georgiev"
|
||||
__all__ = ['IS', 'parse', 'passcode']
|
||||
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ def _parse_comment_telemetry(text):
|
|||
|
||||
if temp[6] != '':
|
||||
parsed['telemetry'].update({
|
||||
'bits': "{0:08b}".format(temp[6] & 0xFF)
|
||||
'bits': "{0:08b}".format(temp[6] & 0xFF)[::-1]
|
||||
})
|
||||
|
||||
return (text, parsed)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class ParseCommentTelemetry(unittest.TestCase):
|
|||
|
||||
# bits as str(11111111)
|
||||
if 'bits' in telem:
|
||||
val = int(telem['bits'], 2)
|
||||
val = int(telem['bits'][::-1], 2)
|
||||
text.append(base91.from_decimal(val, 2))
|
||||
|
||||
text.append("|")
|
||||
|
|
@ -48,7 +48,7 @@ class ParseCommentTelemetry(unittest.TestCase):
|
|||
bits = None
|
||||
|
||||
if len(vals) is 5 and randint(1, 10) > 5:
|
||||
bits = "{:08b}".format(randint(0, 255))
|
||||
bits = "{:08b}".format(randint(0, 255))[::-1]
|
||||
|
||||
testData = self.genTelem(i, vals, bits)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue