mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Add publish workflow and update display layout
This commit is contained in:
@ -9,36 +9,40 @@ class Waveshare3in52(DisplayImpl):
|
||||
super(Waveshare3in52, self).__init__(config, 'waveshare3in52')
|
||||
|
||||
def layout(self):
|
||||
fonts.setup(10, 8, 10, 18, 25, 9)
|
||||
self._layout['width'] = 240
|
||||
self._layout['height'] = 360
|
||||
self._layout['face'] = (0, 43)
|
||||
self._layout['name'] = (0, 14)
|
||||
self._layout['channel'] = (0, 0)
|
||||
self._layout['aps'] = (0, 71)
|
||||
self._layout['uptime'] = (0, 25)
|
||||
self._layout['line1'] = [0, 12, 240, 12]
|
||||
self._layout['line2'] = [0, 116, 240, 116]
|
||||
self._layout['friend_face'] = (12, 88)
|
||||
self._layout['friend_name'] = (1, 103)
|
||||
self._layout['shakes'] = (26, 117)
|
||||
self._layout['mode'] = (0, 117)
|
||||
fonts.setup(16, 14, 16, 100, 31, 15)
|
||||
self._layout['width'] = 360
|
||||
self._layout['height'] = 240
|
||||
self._layout['face'] = (0, 40)
|
||||
self._layout['name'] = (0, 0)
|
||||
self._layout['channel'] = (300, 0)
|
||||
self._layout['aps'] = (0, 220)
|
||||
self._layout['uptime'] = (120, 0)
|
||||
self._layout['line1'] = [0, 24, 360, 24]
|
||||
self._layout['line2'] = [0, 220, 360, 220]
|
||||
self._layout['friend_face'] = (0, 195)
|
||||
self._layout['friend_name'] = (0, 185)
|
||||
self._layout['shakes'] = (100, 220)
|
||||
self._layout['mode'] = (0,200)
|
||||
self._layout['status'] = {
|
||||
'pos': (65, 26),
|
||||
'pos': (3, 170),
|
||||
'font': fonts.status_font(fonts.Small),
|
||||
'max': 12
|
||||
'max': 100
|
||||
}
|
||||
return self._layout
|
||||
|
||||
def initialize(self):
|
||||
logging.info("initializing waveshare 3.52 inch lcd display")
|
||||
logging.info("initializing waveshare 3.52 inch display")
|
||||
from pwnagotchi.ui.hw.libs.waveshare.v3in52.epd3in52 import EPD
|
||||
self._display = EPD()
|
||||
self._display.init()
|
||||
self._display.Clear()
|
||||
|
||||
def render(self, canvas):
|
||||
self._display.display(canvas)
|
||||
self._display.Clear()
|
||||
buf = self._display.getbuffer(canvas)
|
||||
self._display.display(buf)
|
||||
self._display.refresh()
|
||||
|
||||
|
||||
def clear(self):
|
||||
self._display.Clear()
|
||||
self._display.Clear()
|
Reference in New Issue
Block a user