This repository has been archived by the owner on Mar 12, 2024. It is now read-only.
forked from evilsocket/pwnagotchi
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed bogus support for waveshare lcd displays (fixes evilsocket…
- Loading branch information
Simone Margaritelli
committed
Oct 23, 2019
1 parent
5b03d97
commit 148418f
Showing
3 changed files
with
53 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,21 @@ | ||
from . import ST7789 | ||
from . import config | ||
|
||
# Display resolution | ||
EPD_WIDTH = 240 | ||
EPD_HEIGHT = 240 | ||
|
||
disp = ST7789.ST7789(config.spi,config.RST_PIN, config.DC_PIN, config.BL_PIN) | ||
|
||
class EPD(object): | ||
|
||
def __init__(self): | ||
self.reset_pin = config.RST_PIN | ||
self.dc_pin = config.DC_PIN | ||
#self.busy_pin = config.BUSY_PIN | ||
#self.cs_pin = config.CS_PIN | ||
self.width = EPD_WIDTH | ||
self.height = EPD_HEIGHT | ||
self.width = 240 | ||
self.height = 240 | ||
self.st7789 = ST7789.ST7789(config.spi, config.RST_PIN, config.DC_PIN, config.BL_PIN) | ||
|
||
def init(self): | ||
disp.Init() | ||
self.st7789.Init() | ||
|
||
def Clear(self): | ||
disp.clear() | ||
def clear(self): | ||
self.st7789.clear() | ||
|
||
def display(self, image): | ||
rgb_im = image.convert('RGB') | ||
disp.ShowImage(rgb_im,0,0) | ||
self.st7789.ShowImage(rgb_im, 0, 0) |