parent
47bcaa425b
commit
49c9645b8a
@ -123,15 +123,12 @@ class driver(screenDriver):
|
|||||||
try:
|
try:
|
||||||
watchdog.unregister(vcsa[ oldScreen ])
|
watchdog.unregister(vcsa[ oldScreen ])
|
||||||
except:
|
except:
|
||||||
print('watchdog.unregister: '+ str(e))
|
pass
|
||||||
try:
|
try:
|
||||||
watchdog.register(vcsa[ currScreen ], select.POLLPRI | select.POLLERR)
|
watchdog.register(vcsa[ currScreen ], select.POLLPRI | select.POLLERR)
|
||||||
except Exception as e:
|
except:
|
||||||
print('watchdog.register: '+ str(e))
|
pass
|
||||||
try:
|
|
||||||
self.updateCharMap(currScreen)
|
self.updateCharMap(currScreen)
|
||||||
except Exception as e:
|
|
||||||
print('updateCharMap: '+ str(e))
|
|
||||||
oldScreen = currScreen
|
oldScreen = currScreen
|
||||||
try:
|
try:
|
||||||
vcsa[currScreen].seek(0)
|
vcsa[currScreen].seek(0)
|
||||||
@ -147,7 +144,6 @@ class driver(screenDriver):
|
|||||||
dirtyContent = vcsa[currScreen].read()
|
dirtyContent = vcsa[currScreen].read()
|
||||||
screenContent = b''
|
screenContent = b''
|
||||||
timeout = time.time()
|
timeout = time.time()
|
||||||
print('dirty ' + str(currScreen))
|
|
||||||
while screenContent != dirtyContent:
|
while screenContent != dirtyContent:
|
||||||
screenContent = dirtyContent
|
screenContent = dirtyContent
|
||||||
if time.time() - timeout >= 0.4:
|
if time.time() - timeout >= 0.4:
|
||||||
@ -198,10 +194,8 @@ class driver(screenDriver):
|
|||||||
unipairs = array("H", [0]*(2*sz))
|
unipairs = array("H", [0]*(2*sz))
|
||||||
unimapdesc = array("B", pack("@HP", sz, unipairs.buffer_info()[0]))
|
unimapdesc = array("B", pack("@HP", sz, unipairs.buffer_info()[0]))
|
||||||
ioctl(tty.fileno(), GIO_UNIMAP, unimapdesc)
|
ioctl(tty.fileno(), GIO_UNIMAP, unimapdesc)
|
||||||
print('updateCharMap sz good')
|
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('updateCharMap sz wrong: ' + str(e))
|
|
||||||
self.env['runtime']['debug'].writeDebugOut('VCSA:updateCharMap:scaling up sz=' + str(sz) + ' ' + str(e),debug.debugLevel.WARNING)
|
self.env['runtime']['debug'].writeDebugOut('VCSA:updateCharMap:scaling up sz=' + str(sz) + ' ' + str(e),debug.debugLevel.WARNING)
|
||||||
sz *= 2
|
sz *= 2
|
||||||
tty.close()
|
tty.close()
|
||||||
@ -210,13 +204,11 @@ class driver(screenDriver):
|
|||||||
for u, b in zip(utable[::2], utable[1::2]):
|
for u, b in zip(utable[::2], utable[1::2]):
|
||||||
if self.charmap.get(b) is None:
|
if self.charmap.get(b) is None:
|
||||||
self.charmap[b] = chr(u)
|
self.charmap[b] = chr(u)
|
||||||
print('charmap ' + str(self.charmap[b]))
|
|
||||||
|
|
||||||
def autoDecodeVCSA(self, allData, rows, cols):
|
def autoDecodeVCSA(self, allData, rows, cols):
|
||||||
allText = ''
|
allText = ''
|
||||||
allAttrib = []
|
allAttrib = []
|
||||||
i = 0
|
i = 0
|
||||||
print('autoDecodeVCSA start')
|
|
||||||
for y in range(rows):
|
for y in range(rows):
|
||||||
lineText = ''
|
lineText = ''
|
||||||
lineAttrib = []
|
lineAttrib = []
|
||||||
|
Loading…
Reference in New Issue
Block a user