mirror of
https://github.com/Febbweiss/mopidy-touchscreen.git
synced 2026-03-04 22:25:39 +00:00
Config file TFT
This commit is contained in:
@@ -37,6 +37,9 @@ class Extension(ext.Extension):
|
||||
schema['gpio_up'] = config.Integer()
|
||||
schema['gpio_down'] = config.Integer()
|
||||
schema['gpio_enter'] = config.Integer()
|
||||
schema['sdl_fbdev'] = config.String()
|
||||
schema['sdl_mousdrv'] = config.String()
|
||||
schema['sdl_mousedev'] = config.String()
|
||||
return schema
|
||||
|
||||
def setup(self, registry):
|
||||
|
||||
@@ -11,3 +11,6 @@ gpio_right = 27
|
||||
gpio_up = 22
|
||||
gpio_down = 23
|
||||
gpio_enter = 24
|
||||
sdl_fbdev = /dev/fb1
|
||||
sdl_mousdrv = TSLIB
|
||||
sdl_mousedev = event0
|
||||
|
||||
@@ -23,10 +23,9 @@ class TouchScreen(pykka.ThreadingActor, core.CoreListener):
|
||||
config['touchscreen']['screen_height'])
|
||||
self.cache_dir = config['touchscreen']['cache_dir']
|
||||
self.fullscreen = config['touchscreen']['fullscreen']
|
||||
os.environ["SDL_FBDEV"] = "/dev/fb1"
|
||||
os.environ["SDL_MOUSEDEV"] = "/dev/input/touchscreen"
|
||||
os.environ["TSLIB TSDEVICE"] = "/dev/input/eventX"
|
||||
os.environ["SDL_MOUSEDRV"] = "TSLIB"
|
||||
os.environ["SDL_FBDEV"] = config['touchscreen']['sdl_fbdev']
|
||||
os.environ["SDL_MOUSEDRV"] = config['touchscreen']['sdl_mousdrv']
|
||||
os.environ["SDL_MOUSEDEV"] = config['touchscreen']['sdl_mousedev']
|
||||
pygame.init()
|
||||
self.cursor = config['touchscreen']['cursor']
|
||||
self.screen_manager = ScreenManager(self.screen_size, self.core,
|
||||
|
||||
Reference in New Issue
Block a user