waveshare35lcd.py: small bug fix to show face immediately

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-18 20:57:19 +02:00
parent edb4eb0676
commit 422052b97c
3 changed files with 4 additions and 3 deletions

View File

@ -24,6 +24,7 @@ UPLOAD = '(1__0)'
UPLOAD1 = '(1__1)'
UPLOAD2 = '(0__1)'
def load_from_config(config):
for face_name, face_value in config.items():
globals()[face_name.upper()] = face_value

View File

@ -15,7 +15,7 @@ class Waveshare35lcd(DisplayImpl):
fonts.setup(12, 10, 12, 70, 25, 9)
self._layout['width'] = 480
self._layout['height'] = 320
self._layout['face'] = (110, 60)
self._layout['face'] = (110, 100)
self._layout['name'] = (10, 30)
self._layout['channel'] = (0, 0)
self._layout['aps'] = (80, 0)
@ -27,7 +27,7 @@ class Waveshare35lcd(DisplayImpl):
self._layout['shakes'] = (10, 300)
self._layout['mode'] = (440, 300)
self._layout['status'] = {
'pos': (80, 180),
'pos': (80, 200),
'font': fonts.status_font(fonts.Medium),
'max': 100
}

View File

@ -40,7 +40,7 @@ class View(object):
self._width = self._layout['width']
self._height = self._layout['height']
self._state = State(state={
'channel': LabeledValue(color=BLACK, label='CH', value='00', position=self._layout['channel'],
'channel': LabeledValue(color=BLACK, label='CH', value='000', position=self._layout['channel'],
label_font=fonts.Bold,
text_font=fonts.Medium),
'aps': LabeledValue(color=BLACK, label='APS', value='0 (00)', position=self._layout['aps'],