2019-10-15 11:50:09 +02:00
|
|
|
from pwnagotchi.ui.hw.inky import Inky
|
|
|
|
from pwnagotchi.ui.hw.papirus import Papirus
|
|
|
|
from pwnagotchi.ui.hw.oledhat import OledHat
|
2019-10-19 04:49:38 +01:00
|
|
|
from pwnagotchi.ui.hw.lcdhat import LcdHat
|
2019-10-26 12:52:07 -05:00
|
|
|
from pwnagotchi.ui.hw.dfrobot import DFRobot
|
2019-10-15 11:50:09 +02:00
|
|
|
from pwnagotchi.ui.hw.waveshare1 import WaveshareV1
|
|
|
|
from pwnagotchi.ui.hw.waveshare2 import WaveshareV2
|
2019-10-20 21:27:10 +02:00
|
|
|
from pwnagotchi.ui.hw.waveshare27inch import Waveshare27inch
|
2019-11-02 13:48:11 -07:00
|
|
|
from pwnagotchi.ui.hw.waveshare29inch import Waveshare29inch
|
2019-10-27 16:02:00 +01:00
|
|
|
from pwnagotchi.ui.hw.waveshare154inch import Waveshare154inch
|
2019-10-27 12:47:15 -07:00
|
|
|
from pwnagotchi.ui.hw.waveshare213d import Waveshare213d
|
2019-11-11 14:15:48 +01:00
|
|
|
from pwnagotchi.ui.hw.spotpear24inch import Spotpear24inch
|
2019-10-15 11:50:09 +02:00
|
|
|
|
|
|
|
def display_for(config):
|
|
|
|
# config has been normalized already in utils.load_config
|
|
|
|
if config['ui']['display']['type'] == 'inky':
|
|
|
|
return Inky(config)
|
|
|
|
|
|
|
|
elif config['ui']['display']['type'] == 'papirus':
|
|
|
|
return Papirus(config)
|
|
|
|
|
|
|
|
if config['ui']['display']['type'] == 'oledhat':
|
|
|
|
return OledHat(config)
|
|
|
|
|
2019-10-19 04:49:38 +01:00
|
|
|
if config['ui']['display']['type'] == 'lcdhat':
|
|
|
|
return LcdHat(config)
|
|
|
|
|
2019-10-26 12:52:07 -05:00
|
|
|
if config['ui']['display']['type'] == 'dfrobot':
|
|
|
|
return DFRobot(config)
|
2019-10-19 04:49:38 +01:00
|
|
|
|
2019-10-15 11:50:09 +02:00
|
|
|
elif config['ui']['display']['type'] == 'waveshare_1':
|
|
|
|
return WaveshareV1(config)
|
|
|
|
|
|
|
|
elif config['ui']['display']['type'] == 'waveshare_2':
|
|
|
|
return WaveshareV2(config)
|
2019-10-20 21:27:10 +02:00
|
|
|
|
|
|
|
elif config['ui']['display']['type'] == 'waveshare27inch':
|
2019-10-30 22:49:06 -07:00
|
|
|
return Waveshare27inch(config)
|
|
|
|
|
|
|
|
elif config['ui']['display']['type'] == 'waveshare29inch':
|
|
|
|
return Waveshare29inch(config)
|
|
|
|
|
2019-10-27 16:02:00 +01:00
|
|
|
elif config['ui']['display']['type'] == 'waveshare154inch':
|
|
|
|
return Waveshare154inch(config)
|
2019-10-27 12:47:15 -07:00
|
|
|
|
|
|
|
elif config['ui']['display']['type'] == 'waveshare213d':
|
2019-11-11 14:15:48 +01:00
|
|
|
return Waveshare213d(config)
|
|
|
|
|
|
|
|
elif config['ui']['display']['type'] == 'spotpear24inch':
|
|
|
|
return Spotpear24inch(config)
|