From 62e1819dd579fff2061b4c9d9eef99c3591142eb Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 25 Jan 2017 00:31:28 +0100 Subject: [PATCH] add dummy input driver --- src/fenrir/inputDriver/dummy.py | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/fenrir/inputDriver/dummy.py diff --git a/src/fenrir/inputDriver/dummy.py b/src/fenrir/inputDriver/dummy.py new file mode 100644 index 00000000..2e50f201 --- /dev/null +++ b/src/fenrir/inputDriver/dummy.py @@ -0,0 +1,59 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +import time +from core import debug + +class driver(): + def __init__(self): + self._initialized = False + + def initialize(self, environment): + self.env = environment + + def shutdown(self): + pass + + def getInputEvent(self): + time.sleep(0.05) + if not self._initialized: + return None + + def writeEventBuffer(self): + if not self._initialized: + return + + def clearEventBuffer(self): + if not self._initialized: + return + + def getInputDevices(self): + if not self._initialized: + return + + def getLedState(self, led = 0): + if not self._initialized: + return False + return False + + def toggleLedState(self, led = 0): + if not self._initialized: + return None + + def grabDevices(self): + if not self._initialized: + return None + + def releaseDevices(self): + if not self._initialized: + return None + + def __del__(self): + if not self._initialized: + return None + self.releaseDevices() + +