Update waveshare3in7.py

adds fixes for #185 

Signed-off-by: Rai <58925163+rai68@users.noreply.github.com>
This commit is contained in:
Rai
2024-08-13 23:21:13 +10:00
committed by GitHub
parent b9531c60a2
commit 48b3d6dcb5

View File

@ -9,26 +9,26 @@ class Waveshare3in7(DisplayImpl):
super(Waveshare3in7, self).__init__(config, 'waveshare3in7') super(Waveshare3in7, self).__init__(config, 'waveshare3in7')
def layout(self): def layout(self):
fonts.setup(10, 8, 10, 18, 25, 9) fonts.setup(20, 19, 20, 45, 35, 19)
self._layout['width'] = 280 self._layout['width'] = 480
self._layout['height'] = 480 self._layout['height'] = 280
self._layout['face'] = (0, 43) self._layout['face'] = (0,34)
self._layout['name'] = (0, 14) self._layout['name'] = (35,105)
self._layout['channel'] = (0, 0) self._layout['channel'] = (0, 0)
self._layout['aps'] = (0, 71) self._layout['aps'] = (75,0)
self._layout['uptime'] = (0, 25) self._layout['uptime'] = (377,0)
self._layout['line1'] = [0, 12, 280, 12] self._layout['line1'] = [0, 25, 480, 25]
self._layout['line2'] = [0, 116, 280, 116] self._layout['line2'] = [0, 255, 480, 255]
self._layout['friend_face'] = (12, 88) self._layout['friend_face'] = (0, 146)
self._layout['friend_name'] = (1, 103) self._layout['friend_name'] = (40, 146)
self._layout['shakes'] = (26, 117) self._layout['shakes'] = (0, 258)
self._layout['mode'] = (0, 117) self._layout['mode'] = (430, 258)
self._layout['status'] = { self._layout['status'] = {
'pos': (65, 26), 'pos': (225, 35),
'font': fonts.status_font(fonts.Small), 'font': fonts.status_font(fonts.Medium),
'max': 12 'max': 21
} }
return self._layout return self._layout
def initialize(self): def initialize(self):
logging.info("initializing waveshare 3.7 inch lcd display") logging.info("initializing waveshare 3.7 inch lcd display")