Merge pull request #538 from neutralinsomniac/normalize_waveshare29inch_config

normalize the waveshare29inch config string
This commit is contained in:
evilsocket 2019-11-07 10:39:43 +01:00 committed by GitHub
commit e23e1affae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -230,7 +230,7 @@ ui:
display: display:
enabled: true enabled: true
rotation: 180 rotation: 180
# Possible options inkyphat/inky, papirus/papi, waveshare_1/ws_1 or waveshare_2/ws_2, oledhat, lcdhat, waveshare154inch, waveshare27inch, dfrobot/df # Possible options inkyphat/inky, papirus/papi, waveshare_1/ws_1 or waveshare_2/ws_2, oledhat, lcdhat, waveshare154inch, waveshare27inch, waveshare29inch, dfrobot/df
type: 'waveshare_2' type: 'waveshare_2'
# Possible options red/yellow/black (black used for monocromatic displays) # Possible options red/yellow/black (black used for monocromatic displays)
# Waveshare tri-color 2.13in display can be over-driven with color set as 'fastAndFurious' # Waveshare tri-color 2.13in display can be over-driven with color set as 'fastAndFurious'

View File

@ -95,6 +95,9 @@ def load_config(args):
elif config['ui']['display']['type'] in ('ws_27inch', 'ws27inch', 'waveshare_27inch', 'waveshare27inch'): elif config['ui']['display']['type'] in ('ws_27inch', 'ws27inch', 'waveshare_27inch', 'waveshare27inch'):
config['ui']['display']['type'] = 'waveshare27inch' config['ui']['display']['type'] = 'waveshare27inch'
elif config['ui']['display']['type'] in ('ws_29inch', 'ws29inch', 'waveshare_29inch', 'waveshare29inch'):
config['ui']['display']['type'] = 'waveshare29inch'
elif config['ui']['display']['type'] in ('lcdhat',): elif config['ui']['display']['type'] in ('lcdhat',):
config['ui']['display']['type'] = 'lcdhat' config['ui']['display']['type'] = 'lcdhat'