fix brlapi typo
This commit is contained in:
parent
4bf61dc986
commit
3212d1da26
@ -16,12 +16,14 @@ class driver():
|
|||||||
try:
|
try:
|
||||||
import brlapi
|
import brlapi
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.connectDevice()
|
self._brl = brlapi.Connection()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
self.env['runtime']['debug'].writeDebugOut('BRAILLE.connectDevice '+str(e),debug.debugLevel.ERROR)
|
self.env['runtime']['debug'].writeDebugOut('BRAILLE.connectDevice '+str(e),debug.debugLevel.ERROR)
|
||||||
return
|
return
|
||||||
self._isInitialized = True
|
self._isInitialized = True
|
||||||
@ -48,7 +50,7 @@ class driver():
|
|||||||
def enterScreen(self, screen):
|
def enterScreen(self, screen):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
self._brl.enterTtyMode(screen)
|
self._brl.enterTtyMode(int(screen))
|
||||||
|
|
||||||
def leveScreen(self):
|
def leveScreen(self):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
|
@ -58,6 +58,12 @@ class screenManager():
|
|||||||
if not self.env['runtime']['brailleDriver']:
|
if not self.env['runtime']['brailleDriver']:
|
||||||
return
|
return
|
||||||
if not self.isSuspendingScreen(self.env['screenData']['oldTTY']):
|
if not self.isSuspendingScreen(self.env['screenData']['oldTTY']):
|
||||||
|
try:
|
||||||
self.env['runtime']['brailleDriver'].leveScreen()
|
self.env['runtime']['brailleDriver'].leveScreen()
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
if not self.isSuspendingScreen():
|
if not self.isSuspendingScreen():
|
||||||
|
try:
|
||||||
self.env['runtime']['brailleDriver'].enterScreen(self.env['screenData']['newTTY'])
|
self.env['runtime']['brailleDriver'].enterScreen(self.env['screenData']['newTTY'])
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user