mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
waveshare35lcd.py: small bug fix to show face immediately
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -24,6 +24,7 @@ UPLOAD = '(1__0)'
|
|||||||
UPLOAD1 = '(1__1)'
|
UPLOAD1 = '(1__1)'
|
||||||
UPLOAD2 = '(0__1)'
|
UPLOAD2 = '(0__1)'
|
||||||
|
|
||||||
|
|
||||||
def load_from_config(config):
|
def load_from_config(config):
|
||||||
for face_name, face_value in config.items():
|
for face_name, face_value in config.items():
|
||||||
globals()[face_name.upper()] = face_value
|
globals()[face_name.upper()] = face_value
|
||||||
|
@ -15,7 +15,7 @@ class Waveshare35lcd(DisplayImpl):
|
|||||||
fonts.setup(12, 10, 12, 70, 25, 9)
|
fonts.setup(12, 10, 12, 70, 25, 9)
|
||||||
self._layout['width'] = 480
|
self._layout['width'] = 480
|
||||||
self._layout['height'] = 320
|
self._layout['height'] = 320
|
||||||
self._layout['face'] = (110, 60)
|
self._layout['face'] = (110, 100)
|
||||||
self._layout['name'] = (10, 30)
|
self._layout['name'] = (10, 30)
|
||||||
self._layout['channel'] = (0, 0)
|
self._layout['channel'] = (0, 0)
|
||||||
self._layout['aps'] = (80, 0)
|
self._layout['aps'] = (80, 0)
|
||||||
@ -27,7 +27,7 @@ class Waveshare35lcd(DisplayImpl):
|
|||||||
self._layout['shakes'] = (10, 300)
|
self._layout['shakes'] = (10, 300)
|
||||||
self._layout['mode'] = (440, 300)
|
self._layout['mode'] = (440, 300)
|
||||||
self._layout['status'] = {
|
self._layout['status'] = {
|
||||||
'pos': (80, 180),
|
'pos': (80, 200),
|
||||||
'font': fonts.status_font(fonts.Medium),
|
'font': fonts.status_font(fonts.Medium),
|
||||||
'max': 100
|
'max': 100
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ class View(object):
|
|||||||
self._width = self._layout['width']
|
self._width = self._layout['width']
|
||||||
self._height = self._layout['height']
|
self._height = self._layout['height']
|
||||||
self._state = State(state={
|
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,
|
label_font=fonts.Bold,
|
||||||
text_font=fonts.Medium),
|
text_font=fonts.Medium),
|
||||||
'aps': LabeledValue(color=BLACK, label='APS', value='0 (00)', position=self._layout['aps'],
|
'aps': LabeledValue(color=BLACK, label='APS', value='0 (00)', position=self._layout['aps'],
|
||||||
|
Reference in New Issue
Block a user