From efb53c8b53c0aa1fb63c5f91817d8133a4bec5a7 Mon Sep 17 00:00:00 2001 From: Chrys Date: Thu, 22 Aug 2019 22:01:28 +0200 Subject: [PATCH] debug hell --- src/fenrirscreenreader/screenDriver/vcsaDriver.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/fenrirscreenreader/screenDriver/vcsaDriver.py b/src/fenrirscreenreader/screenDriver/vcsaDriver.py index 9d679635..d3e9f6d2 100644 --- a/src/fenrirscreenreader/screenDriver/vcsaDriver.py +++ b/src/fenrirscreenreader/screenDriver/vcsaDriver.py @@ -104,23 +104,34 @@ class driver(screenDriver): vcsu = {} vcsuDevices = None lastScreenContent = b'' + self.env['runtime']['debug'].writeDebugOut('1'),debug.debugLevel.ERROR) tty = open('/sys/devices/virtual/tty/tty0/active','r') + self.env['runtime']['debug'].writeDebugOut('2'),debug.debugLevel.ERROR) currScreen = str(tty.read()[3:-1]) + self.env['runtime']['debug'].writeDebugOut('3'),debug.debugLevel.ERROR) oldScreen = currScreen + self.env['runtime']['debug'].writeDebugOut('4'),debug.debugLevel.ERROR) for vcsaDev in vcsaDevices: index = str(vcsaDev[9:]) + self.env['runtime']['debug'].writeDebugOut('5'),debug.debugLevel.ERROR) vcsa[index] = open(vcsaDev,'rb') + self.env['runtime']['debug'].writeDebugOut('6'),debug.debugLevel.ERROR) if index == currScreen: + self.env['runtime']['debug'].writeDebugOut('7'),debug.debugLevel.ERROR) lastScreenContent = vcsa[index].read() + self.env['runtime']['debug'].writeDebugOut('8'),debug.debugLevel.ERROR) if useVCSU: + self.env['runtime']['debug'].writeDebugOut('VCSU'),debug.debugLevel.ERROR) vcsuDevices = glob.glob('/dev/vcsu*') for vcsuDev in vcsuDevices: index = str(vcsuDev[9:]) vcsu[index] = open(vcsuDev,'rb') + self.env['runtime']['debug'].writeDebugOut('charmap'),debug.debugLevel.ERROR) self.updateCharMap(currScreen) watchdog = select.epoll() watchdog.register(vcsa[currScreen], select.POLLPRI | select.POLLERR) watchdog.register(tty, select.POLLPRI | select.POLLERR) + self.env['runtime']['debug'].writeDebugOut('start'),debug.debugLevel.ERROR) while active.value == 1: changes = watchdog.poll(1) for change in changes: