Update vcsaDriver.py
This commit is contained in:
parent
be6e1be785
commit
7d04672fa4
@ -158,13 +158,13 @@ class driver(screenDriver):
|
|||||||
oldScreen = currScreen
|
oldScreen = currScreen
|
||||||
try:
|
try:
|
||||||
vcsa[currScreen].seek(0)
|
vcsa[currScreen].seek(0)
|
||||||
lastScreenContent = readFile(vcsa[currScreen])
|
lastScreenContent = self.readFile(vcsa[currScreen])
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
vcsuContent = None
|
vcsuContent = None
|
||||||
if useVCSU:
|
if useVCSU:
|
||||||
vcsu[currScreen].seek(0)
|
vcsu[currScreen].seek(0)
|
||||||
vcsuContent = readFile(vcsu[currScreen])
|
vcsuContent = self.readFile(vcsu[currScreen])
|
||||||
eventQueue.put({"Type":fenrirEventType.ScreenChanged,
|
eventQueue.put({"Type":fenrirEventType.ScreenChanged,
|
||||||
"Data":self.createScreenEventData(currScreen, lastScreenContent, vcsuContent)
|
"Data":self.createScreenEventData(currScreen, lastScreenContent, vcsuContent)
|
||||||
})
|
})
|
||||||
@ -172,7 +172,7 @@ class driver(screenDriver):
|
|||||||
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)
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
dirtyContent = readFile(vcsa[currScreen])
|
dirtyContent = self.readFile(vcsa[currScreen])
|
||||||
screenContent = dirtyContent
|
screenContent = dirtyContent
|
||||||
vcsuContent = None
|
vcsuContent = None
|
||||||
timeout = time.time()
|
timeout = time.time()
|
||||||
@ -198,7 +198,7 @@ class driver(screenDriver):
|
|||||||
#if not vcsa[currScreen] in r:
|
#if not vcsa[currScreen] in r:
|
||||||
# break
|
# break
|
||||||
vcsa[currScreen].seek(0)
|
vcsa[currScreen].seek(0)
|
||||||
dirtyContent = readFile(vcsa[currScreen])
|
dirtyContent = self.readFile(vcsa[currScreen])
|
||||||
if screenContent == dirtyContent:
|
if screenContent == dirtyContent:
|
||||||
break
|
break
|
||||||
if time.time() - timeout >= 0.1:
|
if time.time() - timeout >= 0.1:
|
||||||
@ -206,7 +206,7 @@ class driver(screenDriver):
|
|||||||
break
|
break
|
||||||
if useVCSU:
|
if useVCSU:
|
||||||
vcsu[currScreen].seek(0)
|
vcsu[currScreen].seek(0)
|
||||||
vcsuContent = readFile(vcsu[currScreen])
|
vcsuContent = self.readFile(vcsu[currScreen])
|
||||||
lastScreenContent = screenContent
|
lastScreenContent = screenContent
|
||||||
eventQueue.put({"Type":fenrirEventType.ScreenUpdate,
|
eventQueue.put({"Type":fenrirEventType.ScreenUpdate,
|
||||||
"Data":self.createScreenEventData(currScreen, screenContent, vcsuContent)
|
"Data":self.createScreenEventData(currScreen, screenContent, vcsuContent)
|
||||||
|
Loading…
Reference in New Issue
Block a user