Revert "add better heuristic for typing"

This reverts commit 3d5841ded9.
This commit is contained in:
Chrys 2019-08-22 00:42:16 +02:00
parent 3d5841ded9
commit a54e053f91

View File

@ -153,29 +153,17 @@ class driver(screenDriver):
else: else:
self.env['runtime']['debug'].writeDebugOut('ScreenUpdate',debug.debugLevel.INFO) self.env['runtime']['debug'].writeDebugOut('ScreenUpdate',debug.debugLevel.INFO)
vcsa[currScreen].seek(0) vcsa[currScreen].seek(0)
screenContent = vcsa[currScreen].read() dirtyContent = vcsa[currScreen].read()
screenContent = b''
vcsuContent = None vcsuContent = None
DoScan = True
timeout = time.time() timeout = time.time()
while DoScan: while screenContent != dirtyContent:
screenContent = dirtyContent
if time.time() - timeout >= 0.4: if time.time() - timeout >= 0.4:
DoScan = False break
print('timeout')
time.sleep(0.02) time.sleep(0.02)
vcsa[currScreen].seek(0) vcsa[currScreen].seek(0)
dirtyContent = vcsa[currScreen].read() dirtyContent = vcsa[currScreen].read()
# X movement?
if abs( int(screenContent[2]) - int(dirtyContent[2])) in [1]:
DoScan = False
print('X')
# Y movement?
elif abs( int(screenContent[3]) - int(dirtyContent[3])) in [1]:
DoScan = False
print('Y')
elif screenContent == dirtyContent:
DoScan = False
print('gleich')
screenContent = dirtyContent
if useVCSU: if useVCSU:
vcsu[currScreen].seek(0) vcsu[currScreen].seek(0)
vcsuContent = vcsu[currScreen].read() vcsuContent = vcsu[currScreen].read()