Update charmapTTY.py

This commit is contained in:
chrys87 2017-07-14 13:19:04 +02:00 committed by GitHub
parent c97f059775
commit e6d0d26d84

View File

@ -42,6 +42,7 @@ def autoDecodeVCSA(allData):
i = 0 i = 0
for x in range(cols): for x in range(cols):
data = allData[i: i + 2] data = allData[i: i + 2]
i += 2
if data == b' \x07': if data == b' \x07':
#attr = 7 #attr = 7
#ink = 7 #ink = 7
@ -49,7 +50,6 @@ def autoDecodeVCSA(allData):
#ch = ' ' #ch = ' '
lineAttrib.append(7) lineAttrib.append(7)
lineText += ' ' lineText += ' '
i += 2
continue continue
(sh,) = struct.unpack("=H", data) (sh,) = struct.unpack("=H", data)
attr = (sh >> 8) & 0xFF attr = (sh >> 8) & 0xFF
@ -67,7 +67,6 @@ def autoDecodeVCSA(allData):
lineText += charmap[ch] lineText += charmap[ch]
except: except:
lineText += chr('?') lineText += chr('?')
i += 2
allText.append(lineText) allText.append(lineText)
allAttrib.append(lineAttrib) allAttrib.append(lineAttrib)
return allText, allAttrib return allText, allAttrib