diff --git a/pwnagotchi/ui/hw/lcdhat.py b/pwnagotchi/ui/hw/lcdhat.py index 5ed0b133..8d2be58c 100644 --- a/pwnagotchi/ui/hw/lcdhat.py +++ b/pwnagotchi/ui/hw/lcdhat.py @@ -33,7 +33,7 @@ class LcdHat(DisplayImpl): def initialize(self): logging.info("initializing lcdhat display") - from pwnagotchi.ui.hw.libs.waveshare.lcdhat.epd import EPD + from pwnagotchi.ui.hw.libs.waveshare.lcd.lcdhat.epd import EPD self._display = EPD() self._display.init() self._display.clear() diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcdhat/__init__.py b/pwnagotchi/ui/hw/libs/__init__.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/lcdhat/__init__.py rename to pwnagotchi/ui/hw/libs/__init__.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcdhat144/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/__init__.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/lcdhat144/__init__.py rename to pwnagotchi/ui/hw/libs/waveshare/__init__.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/oledhat/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/__init__.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/oledhat/__init__.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/__init__.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/epdconfig.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/epdconfig.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/epdconfig.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/epdconfig.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v13in3k/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v13in3k/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v13in3k/epd13in3k.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v13in3k/epd13in3k.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v13in3k/epd13in3k.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v13in3k/epd13in3k.py index b535dd18..9c197eba 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v13in3k/epd13in3k.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v13in3k/epd13in3k.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 960 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in02/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in02/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v1in02/epd1in02.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in02/epd1in02.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v1in02/epd1in02.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v1in02/epd1in02.py index 25fe7231..783da105 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v1in02/epd1in02.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in02/epd1in02.py @@ -29,7 +29,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 80 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v1in54/epd1in54.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54/epd1in54.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v1in54/epd1in54.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54/epd1in54.py index f7415ba3..d0aaaf83 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v1in54/epd1in54.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54/epd1in54.py @@ -80,7 +80,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 200 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v1in54_v2/epd1in54_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54_v2/epd1in54_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v1in54_v2/epd1in54_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54_v2/epd1in54_V2.py index e2f42a68..c77700a9 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v1in54_v2/epd1in54_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54_v2/epd1in54_V2.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 200 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v1in54b/epd1in54b.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b/epd1in54b.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v1in54b/epd1in54b.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b/epd1in54b.py index 6262daf5..3ce9ae32 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v1in54b/epd1in54b.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b/epd1in54b.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 200 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v1in54b_v2/epd1in54b_v2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b_v2/epd1in54b_v2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v1in54b_v2/epd1in54b_v2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b_v2/epd1in54b_v2.py index 9f0d5848..2a996f29 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v1in54b_v2/epd1in54b_v2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54b_v2/epd1in54b_v2.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 200 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54c/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54c/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v1in54c/epd1in54c.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54c/epd1in54c.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v1in54c/epd1in54c.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54c/epd1in54c.py index d07078af..ec7538c8 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v1in54c/epd1in54c.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in54c/epd1in54c.py @@ -27,7 +27,7 @@ # THE SOFTWARE. # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 152 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in64g/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in64g/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v1in64g/epd1in64g.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in64g/epd1in64g.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v1in64g/epd1in64g.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v1in64g/epd1in64g.py index 5310d847..4d97afe5 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v1in64g/epd1in64g.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v1in64g/epd1in64g.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 168 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13.py index 394ab177..196860ca 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 122 diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13bc.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13bc.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13bc.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13bc.py index 96bbf063..7cf883a6 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13bc.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13bc.py @@ -27,7 +27,7 @@ # THE SOFTWARE. # -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig import RPi.GPIO as GPIO # import numpy as np diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13bcFAST.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13bcFAST.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13bcFAST.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13bcFAST.py index 82ac744c..51448e6a 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V1/epd2in13bcFAST.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V1/epd2in13bcFAST.py @@ -40,9 +40,8 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig from PIL import Image -import RPi.GPIO as GPIO # Display resolution EPD_WIDTH = 104 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V2/epd2in13_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V2/epd2in13_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13_V2/epd2in13_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V2/epd2in13_V2.py index 813ca632..f6322b3a 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V2/epd2in13_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V2/epd2in13_V2.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 122 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V3/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V3/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V3/epd2in13_V3.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V3/epd2in13_V3.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13_V3/epd2in13_V3.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V3/epd2in13_V3.py index 47f89a9e..dba21c57 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V3/epd2in13_V3.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V3/epd2in13_V3.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 122 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V4/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V4/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V4/epd2in13_V4.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V4/epd2in13_V4.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13_V4/epd2in13_V4.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V4/epd2in13_V4.py index 625cd97c..f9cfbb45 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13_V4/epd2in13_V4.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13_V4/epd2in13_V4.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 122 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v3/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v3/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13b_v3/epd2in13b_V3.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v3/epd2in13b_V3.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13b_v3/epd2in13b_V3.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v3/epd2in13b_V3.py index eb07034f..616508f3 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13b_v3/epd2in13b_V3.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v3/epd2in13b_V3.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 104 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v4/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v4/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13b_v4/epd2in13b_V4.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v4/epd2in13b_V4.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13b_v4/epd2in13b_V4.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v4/epd2in13b_V4.py index e6509880..d9d03eb7 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13b_v4/epd2in13b_V4.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13b_v4/epd2in13b_V4.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 122 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13bc/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13bc/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13bc/epd2in13bc.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13bc/epd2in13bc.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13bc/epd2in13bc.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13bc/epd2in13bc.py index 62043a4f..0830c92e 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13bc/epd2in13bc.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13bc/epd2in13bc.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig from PIL import Image # Display resolution diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13d/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13d/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13d/epd2in13d.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13d/epd2in13d.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13d/epd2in13d.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13d/epd2in13d.py index 7a2c6cf2..4beb92fb 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13d/epd2in13d.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13d/epd2in13d.py @@ -29,9 +29,8 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig from PIL import Image -import RPi.GPIO as GPIO # Display resolution EPD_WIDTH = 104 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13g/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13g/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in13g/epd2in13g.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13g/epd2in13g.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in13g/epd2in13g.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13g/epd2in13g.py index 48f9e806..072a4e83 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in13g/epd2in13g.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in13g/epd2in13g.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 122 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in23g/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in23g/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in23g/epd2in13g.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in23g/epd2in13g.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in23g/epd2in13g.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in23g/epd2in13g.py index d767af73..80f54114 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in23g/epd2in13g.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in23g/epd2in13g.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 122 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in36g/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in36g/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in36g/epd2in36g.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in36g/epd2in36g.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in36g/epd2in36g.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in36g/epd2in36g.py index ddb646bf..4f62502b 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in36g/epd2in36g.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in36g/epd2in36g.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 168 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in66/epd2in66.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66/epd2in66.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in66/epd2in66.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66/epd2in66.py index 67295e7e..abe61c49 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in66/epd2in66.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66/epd2in66.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 152 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66b/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66b/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in66b/epd2in66b.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66b/epd2in66b.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in66b/epd2in66b.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66b/epd2in66b.py index 4ced4d7c..018925e7 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in66b/epd2in66b.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66b/epd2in66b.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 152 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66g/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66g/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in66g/epd2in66g.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66g/epd2in66g.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in66g/epd2in66g.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66g/epd2in66g.py index f874b201..9e7113bc 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in66g/epd2in66g.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in66g/epd2in66g.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 184 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in7/epd2in7.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7/epd2in7.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in7/epd2in7.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7/epd2in7.py index a109872c..aa4c7c9c 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in7/epd2in7.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7/epd2in7.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 176 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in7_v2/epd2in7_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7_v2/epd2in7_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in7_v2/epd2in7_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7_v2/epd2in7_V2.py index ae4e40a4..c12e2650 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in7_v2/epd2in7_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7_v2/epd2in7_V2.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 176 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in7b/epd2in7b.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b/epd2in7b.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in7b/epd2in7b.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b/epd2in7b.py index 0486c07a..043a8f6a 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in7b/epd2in7b.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b/epd2in7b.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 176 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in7b_v2/epd2in7b_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b_v2/epd2in7b_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in7b_v2/epd2in7b_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b_v2/epd2in7b_V2.py index e22d7ba8..8ae970e4 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in7b_v2/epd2in7b_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in7b_v2/epd2in7b_V2.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 176 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in9/epd2in9.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9/epd2in9.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in9/epd2in9.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9/epd2in9.py index 5dd4d759..8489ba5c 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in9/epd2in9.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9/epd2in9.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 128 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in9_v2/epd2in9V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9_v2/epd2in9V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in9_v2/epd2in9V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9_v2/epd2in9V2.py index ce8bd80f..80f98f72 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in9_v2/epd2in9V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9_v2/epd2in9V2.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 128 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v3/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v3/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in9b_v3/epd2in9b_V3.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v3/epd2in9b_V3.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v2in9b_v3/epd2in9b_V3.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v3/epd2in9b_V3.py index e3a4124e..9fcc5156 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in9b_v3/epd2in9b_V3.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v3/epd2in9b_V3.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 128 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v4/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v4/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in9b_v4/epd2in9b_V4.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v4/epd2in9b_V4.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in9b_v4/epd2in9b_V4.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v4/epd2in9b_V4.py index a5e904ee..e534c049 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in9b_v4/epd2in9b_V4.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9b_v4/epd2in9b_V4.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 128 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9bc/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9bc/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in9bc/epd2in9bc.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9bc/epd2in9bc.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v2in9bc/epd2in9bc.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9bc/epd2in9bc.py index da2c9be9..dad0ccff 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in9bc/epd2in9bc.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9bc/epd2in9bc.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 128 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9d/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9d/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v2in9d/epd2in9d.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9d/epd2in9d.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v2in9d/epd2in9d.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9d/epd2in9d.py index 936e7ad8..56e985fa 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v2in9d/epd2in9d.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v2in9d/epd2in9d.py @@ -30,9 +30,8 @@ # THE SOFTWARE. # -from distutils.command.build_scripts import build_scripts import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 128 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in0g/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in0g/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v3in0g/epd3in0g.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in0g/epd3in0g.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v3in0g/epd3in0g.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v3in0g/epd3in0g.py index ec076d01..cc571abd 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v3in0g/epd3in0g.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in0g/epd3in0g.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 168 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in52/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in52/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v3in52/epd3in52.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in52/epd3in52.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v3in52/epd3in52.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v3in52/epd3in52.py index eb7d720a..9a0f0587 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v3in52/epd3in52.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in52/epd3in52.py @@ -28,8 +28,7 @@ # import logging -from multiprocessing.reduction import recv_handle -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 240 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in7/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in7/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v3in7/epd3in7.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in7/epd3in7.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v3in7/epd3in7.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v3in7/epd3in7.py index fd626f57..ac28fa1e 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v3in7/epd3in7.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v3in7/epd3in7.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 280 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in01f/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in01f/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v4in01f/epd4in01f.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in01f/epd4in01f.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v4in01f/epd4in01f.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v4in01f/epd4in01f.py index 95ce0061..1e4f542b 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v4in01f/epd4in01f.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in01f/epd4in01f.py @@ -30,7 +30,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 640 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v4in2/epd4in2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2/epd4in2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v4in2/epd4in2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2/epd4in2.py index acab6852..cdcb6398 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v4in2/epd4in2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2/epd4in2.py @@ -29,9 +29,7 @@ import logging -from .. import epdconfig -from PIL import Image -import RPi.GPIO as GPIO +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 400 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in26/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in26/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v4in26/epd4in26.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in26/epd4in26.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v4in26/epd4in26.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v4in26/epd4in26.py index 8da379bd..1ce6b60a 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v4in26/epd4in26.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in26/epd4in26.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 800 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v4in2_v2/epd4in2_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2_v2/epd4in2_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v4in2_v2/epd4in2_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2_v2/epd4in2_V2.py index 81b8b246..2534dfd5 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v4in2_v2/epd4in2_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2_v2/epd4in2_V2.py @@ -29,9 +29,7 @@ import logging -from .. import epdconfig -from PIL import Image -import RPi.GPIO as GPIO +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 400 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2b_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2b_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v4in2b_v2/epd4in2b_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2b_v2/epd4in2b_V2.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v4in2b_v2/epd4in2b_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2b_v2/epd4in2b_V2.py index d605dabc..7843f829 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v4in2b_v2/epd4in2b_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2b_v2/epd4in2b_V2.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 400 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2bc/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2bc/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v4in2bc/epd4in2bc.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2bc/epd4in2bc.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v4in2bc/epd4in2bc.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2bc/epd4in2bc.py index 84a7875f..e3419645 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v4in2bc/epd4in2bc.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in2bc/epd4in2bc.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 400 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in37g/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in37g/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v4in37g/epd4in37g.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in37g/epd4in37g.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v4in37g/epd4in37g.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v4in37g/epd4in37g.py index 94814a67..e08756c2 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v4in37g/epd4in37g.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v4in37g/epd4in37g.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 512 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in65f/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in65f/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v5in65f/epd5in65f.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in65f/epd5in65f.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/v5in65f/epd5in65f.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v5in65f/epd5in65f.py index cac1f701..36030a17 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v5in65f/epd5in65f.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in65f/epd5in65f.py @@ -30,11 +30,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 600 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v5in79/epd5in79.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79/epd5in79.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v5in79/epd5in79.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79/epd5in79.py index ff13d298..66e155a5 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v5in79/epd5in79.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79/epd5in79.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 792 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79b/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79b/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v5in79b/epd5in79b.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79b/epd5in79b.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v5in79b/epd5in79b.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79b/epd5in79b.py index 8e499501..5e489654 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v5in79b/epd5in79b.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in79b/epd5in79b.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 792 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v5in83/epd5in83.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83/epd5in83.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v5in83/epd5in83.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83/epd5in83.py index aab289fb..f981a2bb 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v5in83/epd5in83.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83/epd5in83.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 600 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v5in83_v2/epd5in83_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83_v2/epd5in83_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v5in83_v2/epd5in83_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83_v2/epd5in83_V2.py index 852551c3..f38a2ae8 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v5in83_v2/epd5in83_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83_v2/epd5in83_V2.py @@ -28,7 +28,7 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 648 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83b_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83b_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v5in83b_v2/epd5in83b_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83b_v2/epd5in83b_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v5in83b_v2/epd5in83b_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83b_v2/epd5in83b_V2.py index 56c498ce..9232e91e 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v5in83b_v2/epd5in83b_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83b_v2/epd5in83b_V2.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 648 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83bc/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83bc/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v5in83bc/epd5in83bc.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83bc/epd5in83bc.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v5in83bc/epd5in83bc.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83bc/epd5in83bc.py index 57cf208e..e584127e 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v5in83bc/epd5in83bc.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v5in83bc/epd5in83bc.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 600 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3f/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3f/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in3f/epd7in3f.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3f/epd7in3f.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in3f/epd7in3f.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3f/epd7in3f.py index bf756751..5ad579ab 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in3f/epd7in3f.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3f/epd7in3f.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 800 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3g/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3g/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in3g/epd7in3g.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3g/epd7in3g.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in3g/epd7in3g.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3g/epd7in3g.py index 7ef4a46b..52f7e95c 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in3g/epd7in3g.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in3g/epd7in3g.py @@ -29,11 +29,9 @@ # import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig -import PIL from PIL import Image -import io # Display resolution EPD_WIDTH = 800 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in5/epd7in5.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5/epd7in5.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in5/epd7in5.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5/epd7in5.py index 1beef452..6a7206b9 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in5/epd7in5.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5/epd7in5.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 640 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_HD/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_HD/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in5_HD/epd7in5_HD.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_HD/epd7in5_HD.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in5_HD/epd7in5_HD.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_HD/epd7in5_HD.py index 8da379bd..1ce6b60a 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in5_HD/epd7in5_HD.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_HD/epd7in5_HD.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 800 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2.py index 60c38762..8adf0a3a 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 800 diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2_fast.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2_fast.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2_fast.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2_fast.py index 4c481e70..17836f42 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2_fast.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2_fast.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 800 diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2_old.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2_old.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2_old.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2_old.py index 3d8c6c25..944f155d 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in5_v2/epd7in5_V2_old.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5_v2/epd7in5_V2_old.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 800 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_HD/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_HD/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in5b_HD/epd7in5b_HD.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_HD/epd7in5b_HD.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in5b_HD/epd7in5b_HD.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_HD/epd7in5b_HD.py index fc8a5b3c..addb8524 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in5b_HD/epd7in5b_HD.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_HD/epd7in5b_HD.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 880 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_v2/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_v2/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in5b_v2/epd7in5b_V2.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_v2/epd7in5b_V2.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in5b_v2/epd7in5b_V2.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_v2/epd7in5b_V2.py index c58cdc3b..680f72de 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in5b_v2/epd7in5b_V2.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5b_v2/epd7in5b_V2.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 800 diff --git a/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5bc/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5bc/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/v7in5bc/epd7in5bc.py b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5bc/epd7in5bc.py similarity index 99% rename from pwnagotchi/ui/hw/libs/waveshare/v7in5bc/epd7in5bc.py rename to pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5bc/epd7in5bc.py index 356efc61..6bf5631c 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/v7in5bc/epd7in5bc.py +++ b/pwnagotchi/ui/hw/libs/waveshare/epaper/v7in5bc/epd7in5bc.py @@ -29,7 +29,7 @@ import logging -from .. import epdconfig +from pwnagotchi.ui.hw.libs.waveshare.epaper import epdconfig # Display resolution EPD_WIDTH = 640 diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcdhat/ST7789.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/ST7789.py similarity index 96% rename from pwnagotchi/ui/hw/libs/waveshare/lcdhat/ST7789.py rename to pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/ST7789.py index 3864d798..759a0492 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/lcdhat/ST7789.py +++ b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/ST7789.py @@ -1,166 +1,166 @@ -import spidev -import RPi.GPIO as GPIO -import time -import numpy as np - - -class ST7789(object): - """class for ST7789 240*240 1.3inch OLED displays.""" - - def __init__(self, spi, rst=27, dc=25, bl=24): - self.width = 240 - self.height = 240 - # Initialize DC RST pin - self._dc = dc - self._rst = rst - self._bl = bl - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(self._dc, GPIO.OUT) - GPIO.setup(self._rst, GPIO.OUT) - GPIO.setup(self._bl, GPIO.OUT) - GPIO.output(self._bl, GPIO.HIGH) - # Initialize SPI - self._spi = spi - self._spi.max_speed_hz = 40000000 - - """ Write register address and data """ - - def command(self, cmd): - GPIO.output(self._dc, GPIO.LOW) - self._spi.writebytes([cmd]) - - def data(self, val): - GPIO.output(self._dc, GPIO.HIGH) - self._spi.writebytes([val]) - - def Init(self): - """Initialize display""" - self.reset() - - self.command(0x36) - self.data(0x70) # self.data(0x00) - - self.command(0x3A) - self.data(0x05) - - self.command(0xB2) - self.data(0x0C) - self.data(0x0C) - self.data(0x00) - self.data(0x33) - self.data(0x33) - - self.command(0xB7) - self.data(0x35) - - self.command(0xBB) - self.data(0x19) - - self.command(0xC0) - self.data(0x2C) - - self.command(0xC2) - self.data(0x01) - - self.command(0xC3) - self.data(0x12) - - self.command(0xC4) - self.data(0x20) - - self.command(0xC6) - self.data(0x0F) - - self.command(0xD0) - self.data(0xA4) - self.data(0xA1) - - self.command(0xE0) - self.data(0xD0) - self.data(0x04) - self.data(0x0D) - self.data(0x11) - self.data(0x13) - self.data(0x2B) - self.data(0x3F) - self.data(0x54) - self.data(0x4C) - self.data(0x18) - self.data(0x0D) - self.data(0x0B) - self.data(0x1F) - self.data(0x23) - - self.command(0xE1) - self.data(0xD0) - self.data(0x04) - self.data(0x0C) - self.data(0x11) - self.data(0x13) - self.data(0x2C) - self.data(0x3F) - self.data(0x44) - self.data(0x51) - self.data(0x2F) - self.data(0x1F) - self.data(0x1F) - self.data(0x20) - self.data(0x23) - - self.command(0x21) - - self.command(0x11) - - self.command(0x29) - - def reset(self): - """Reset the display""" - GPIO.output(self._rst, GPIO.HIGH) - time.sleep(0.01) - GPIO.output(self._rst, GPIO.LOW) - time.sleep(0.01) - GPIO.output(self._rst, GPIO.HIGH) - time.sleep(0.01) - - def SetWindows(self, Xstart, Ystart, Xend, Yend): - # set the X coordinates - self.command(0x2A) - self.data(0x00) # Set the horizontal starting point to the high octet - self.data(Xstart & 0xff) # Set the horizontal starting point to the low octet - self.data(0x00) # Set the horizontal end to the high octet - self.data((Xend - 1) & 0xff) # Set the horizontal end to the low octet - - # set the Y coordinates - self.command(0x2B) - self.data(0x00) - self.data((Ystart & 0xff)) - self.data(0x00) - self.data((Yend - 1) & 0xff) - - self.command(0x2C) - - def ShowImage(self, Image, Xstart, Ystart): - """Set buffer to value of Python Imaging Library image.""" - """Write display buffer to physical display""" - imwidth, imheight = Image.size - if imwidth != self.width or imheight != self.height: - raise ValueError('Image must be same dimensions as display \ - ({0}x{1}).'.format(self.width, self.height)) - img = np.asarray(Image) - pix = np.zeros((self.width, self.height, 2), dtype=np.uint8) - pix[..., [0]] = np.add(np.bitwise_and(img[..., [0]], 0xF8), np.right_shift(img[..., [1]], 5)) - pix[..., [1]] = np.add(np.bitwise_and(np.left_shift(img[..., [1]], 3), 0xE0), np.right_shift(img[..., [2]], 3)) - pix = pix.flatten().tolist() - self.SetWindows(0, 0, self.width, self.height) - GPIO.output(self._dc, GPIO.HIGH) - for i in range(0, len(pix), 4096): - self._spi.writebytes(pix[i:i + 4096]) - - def clear(self): - """Clear contents of image buffer""" - _buffer = [0xff] * (self.width * self.height * 2) - self.SetWindows(0, 0, self.width, self.height) - GPIO.output(self._dc, GPIO.HIGH) - for i in range(0, len(_buffer), 4096): - self._spi.writebytes(_buffer[i:i + 4096]) +import spidev +import RPi.GPIO as GPIO +import time +import numpy as np + + +class ST7789(object): + """class for ST7789 240*240 1.3inch OLED displays.""" + + def __init__(self, spi, rst=27, dc=25, bl=24): + self.width = 240 + self.height = 240 + # Initialize DC RST pin + self._dc = dc + self._rst = rst + self._bl = bl + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(self._dc, GPIO.OUT) + GPIO.setup(self._rst, GPIO.OUT) + GPIO.setup(self._bl, GPIO.OUT) + GPIO.output(self._bl, GPIO.HIGH) + # Initialize SPI + self._spi = spi + self._spi.max_speed_hz = 40000000 + + """ Write register address and data """ + + def command(self, cmd): + GPIO.output(self._dc, GPIO.LOW) + self._spi.writebytes([cmd]) + + def data(self, val): + GPIO.output(self._dc, GPIO.HIGH) + self._spi.writebytes([val]) + + def Init(self): + """Initialize display""" + self.reset() + + self.command(0x36) + self.data(0x70) # self.data(0x00) + + self.command(0x3A) + self.data(0x05) + + self.command(0xB2) + self.data(0x0C) + self.data(0x0C) + self.data(0x00) + self.data(0x33) + self.data(0x33) + + self.command(0xB7) + self.data(0x35) + + self.command(0xBB) + self.data(0x19) + + self.command(0xC0) + self.data(0x2C) + + self.command(0xC2) + self.data(0x01) + + self.command(0xC3) + self.data(0x12) + + self.command(0xC4) + self.data(0x20) + + self.command(0xC6) + self.data(0x0F) + + self.command(0xD0) + self.data(0xA4) + self.data(0xA1) + + self.command(0xE0) + self.data(0xD0) + self.data(0x04) + self.data(0x0D) + self.data(0x11) + self.data(0x13) + self.data(0x2B) + self.data(0x3F) + self.data(0x54) + self.data(0x4C) + self.data(0x18) + self.data(0x0D) + self.data(0x0B) + self.data(0x1F) + self.data(0x23) + + self.command(0xE1) + self.data(0xD0) + self.data(0x04) + self.data(0x0C) + self.data(0x11) + self.data(0x13) + self.data(0x2C) + self.data(0x3F) + self.data(0x44) + self.data(0x51) + self.data(0x2F) + self.data(0x1F) + self.data(0x1F) + self.data(0x20) + self.data(0x23) + + self.command(0x21) + + self.command(0x11) + + self.command(0x29) + + def reset(self): + """Reset the display""" + GPIO.output(self._rst, GPIO.HIGH) + time.sleep(0.01) + GPIO.output(self._rst, GPIO.LOW) + time.sleep(0.01) + GPIO.output(self._rst, GPIO.HIGH) + time.sleep(0.01) + + def SetWindows(self, Xstart, Ystart, Xend, Yend): + # set the X coordinates + self.command(0x2A) + self.data(0x00) # Set the horizontal starting point to the high octet + self.data(Xstart & 0xff) # Set the horizontal starting point to the low octet + self.data(0x00) # Set the horizontal end to the high octet + self.data((Xend - 1) & 0xff) # Set the horizontal end to the low octet + + # set the Y coordinates + self.command(0x2B) + self.data(0x00) + self.data((Ystart & 0xff)) + self.data(0x00) + self.data((Yend - 1) & 0xff) + + self.command(0x2C) + + def ShowImage(self, Image, Xstart, Ystart): + """Set buffer to value of Python Imaging Library image.""" + """Write display buffer to physical display""" + imwidth, imheight = Image.size + if imwidth != self.width or imheight != self.height: + raise ValueError('Image must be same dimensions as display \ + ({0}x{1}).'.format(self.width, self.height)) + img = np.asarray(Image) + pix = np.zeros((self.width, self.height, 2), dtype=np.uint8) + pix[..., [0]] = np.add(np.bitwise_and(img[..., [0]], 0xF8), np.right_shift(img[..., [1]], 5)) + pix[..., [1]] = np.add(np.bitwise_and(np.left_shift(img[..., [1]], 3), 0xE0), np.right_shift(img[..., [2]], 3)) + pix = pix.flatten().tolist() + self.SetWindows(0, 0, self.width, self.height) + GPIO.output(self._dc, GPIO.HIGH) + for i in range(0, len(pix), 4096): + self._spi.writebytes(pix[i:i + 4096]) + + def clear(self): + """Clear contents of image buffer""" + _buffer = [0xff] * (self.width * self.height * 2) + self.SetWindows(0, 0, self.width, self.height) + GPIO.output(self._dc, GPIO.HIGH) + for i in range(0, len(_buffer), 4096): + self._spi.writebytes(_buffer[i:i + 4096]) diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcdhat/config.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/config.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/lcdhat/config.py rename to pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/config.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcdhat/epd.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/epd.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/lcdhat/epd.py rename to pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat/epd.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat0in96/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat0in96/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcdhat144/LCD_1in44.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/LCD_1in44.py similarity index 98% rename from pwnagotchi/ui/hw/libs/waveshare/lcdhat144/LCD_1in44.py rename to pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/LCD_1in44.py index 26f48508..490a0266 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/lcdhat144/LCD_1in44.py +++ b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/LCD_1in44.py @@ -27,8 +27,7 @@ import RPi.GPIO as GPIO -import time -import numpy as np + import numpy as np from . import config LCD_1IN44 = 1 @@ -249,7 +248,7 @@ class LCD: #Turn on the backlight #GPIO.setup(config.LCD_BL_PIN, GPIO.OUT) - GPIO.output(config.LCD_BL_PIN,GPIO.HIGH) + GPIO.output(config.LCD_BL_PIN, GPIO.HIGH) #Hardware reset self.LCD_Reset() @@ -299,7 +298,7 @@ class LCD: self.LCD_SetWindows(0, 0, self.width, self.height) GPIO.output(config.LCD_DC_PIN, GPIO.HIGH) for i in range(0,len(_buffer),4096): - config.SPI_Write_Byte(_buffer[i:i+4096]) + config.SPI_Write_Byte(_buffer[i:i + 4096]) def LCD_ShowImage(self,Image,Xstart,Ystart): if (Image == None): @@ -316,4 +315,4 @@ class LCD: self.LCD_SetWindows(0, 0, self.width , self.height) GPIO.output(config.LCD_DC_PIN, GPIO.HIGH) for i in range(0,len(pix),4096): - config.SPI_Write_Byte(pix[i:i+4096]) + config.SPI_Write_Byte(pix[i:i + 4096]) diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcdhat144/config.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/config.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/lcdhat144/config.py rename to pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/config.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcdhat144/epd.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/epd.py similarity index 97% rename from pwnagotchi/ui/hw/libs/waveshare/lcdhat144/epd.py rename to pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/epd.py index 75615187..eac72013 100644 --- a/pwnagotchi/ui/hw/libs/waveshare/lcdhat144/epd.py +++ b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat144/epd.py @@ -8,7 +8,6 @@ # Backlight: LED # Operating voltage: 3.3V -from . import config from . import LCD_1in44 from PIL import ImageOps diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in14/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in14/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in28/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in28/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in3/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in3/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in47/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in47/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in54/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in54/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in69/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in69/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in8/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in8/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in9/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat1in9/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat2in0/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat2in0/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat2in4/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/lcd/lcdhat2in4/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/oled/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/oled/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/oledhat/SH1106.py b/pwnagotchi/ui/hw/libs/waveshare/oled/oledhat/SH1106.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/oledhat/SH1106.py rename to pwnagotchi/ui/hw/libs/waveshare/oled/oledhat/SH1106.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/oled/oledhat/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/oled/oledhat/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/libs/waveshare/oledhat/config.py b/pwnagotchi/ui/hw/libs/waveshare/oled/oledhat/config.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/oledhat/config.py rename to pwnagotchi/ui/hw/libs/waveshare/oled/oledhat/config.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/oledhat/epd.py b/pwnagotchi/ui/hw/libs/waveshare/oled/oledhat/epd.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/oledhat/epd.py rename to pwnagotchi/ui/hw/libs/waveshare/oled/oledhat/epd.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/oledlcd/ST7789.py b/pwnagotchi/ui/hw/libs/waveshare/oled/oledlcd/ST7789.py similarity index 100% rename from pwnagotchi/ui/hw/libs/waveshare/oledlcd/ST7789.py rename to pwnagotchi/ui/hw/libs/waveshare/oled/oledlcd/ST7789.py diff --git a/pwnagotchi/ui/hw/libs/waveshare/oled/oledlcd/__init__.py b/pwnagotchi/ui/hw/libs/waveshare/oled/oledlcd/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pwnagotchi/ui/hw/oledhat.py b/pwnagotchi/ui/hw/oledhat.py index 1c2f9fdf..5c54d387 100644 --- a/pwnagotchi/ui/hw/oledhat.py +++ b/pwnagotchi/ui/hw/oledhat.py @@ -32,7 +32,7 @@ class OledHat(DisplayImpl): def initialize(self): logging.info("initializing oledhat display") - from pwnagotchi.ui.hw.libs.waveshare.oledhat.epd import EPD + from pwnagotchi.ui.hw.libs.waveshare.oled.oledhat.epd import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare13in3k.py b/pwnagotchi/ui/hw/waveshare13in3k.py index 5b464057..4520e0d6 100644 --- a/pwnagotchi/ui/hw/waveshare13in3k.py +++ b/pwnagotchi/ui/hw/waveshare13in3k.py @@ -32,7 +32,7 @@ class Waveshare13in3k(DisplayImpl): def initialize(self): logging.info("initializing waveshare 13.3k inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v13in3k.epd13in3k import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v13in3k.epd13in3k import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare144lcd.py b/pwnagotchi/ui/hw/waveshare144lcd.py index b5264954..7ff544ab 100644 --- a/pwnagotchi/ui/hw/waveshare144lcd.py +++ b/pwnagotchi/ui/hw/waveshare144lcd.py @@ -32,7 +32,7 @@ class Waveshare144lcd(DisplayImpl): def initialize(self): logging.info("initializing waveshare 1.44 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.lcdhat144.epd import EPD + from pwnagotchi.ui.hw.libs.waveshare.lcd.lcdhat144.epd import EPD self._display = EPD() self._display.init() self._display.clear() diff --git a/pwnagotchi/ui/hw/waveshare1in02.py b/pwnagotchi/ui/hw/waveshare1in02.py index e5d5cee1..305ca515 100644 --- a/pwnagotchi/ui/hw/waveshare1in02.py +++ b/pwnagotchi/ui/hw/waveshare1in02.py @@ -32,7 +32,7 @@ class Waveshare1in02(DisplayImpl): def initialize(self): logging.info("initializing waveshare 1.02 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v1in02.epd1in02 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v1in02.epd1in02 import EPD self._display = EPD() self._display.Init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare1in44lcd.py b/pwnagotchi/ui/hw/waveshare1in44lcd.py index b5264954..7ff544ab 100644 --- a/pwnagotchi/ui/hw/waveshare1in44lcd.py +++ b/pwnagotchi/ui/hw/waveshare1in44lcd.py @@ -32,7 +32,7 @@ class Waveshare144lcd(DisplayImpl): def initialize(self): logging.info("initializing waveshare 1.44 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.lcdhat144.epd import EPD + from pwnagotchi.ui.hw.libs.waveshare.lcd.lcdhat144.epd import EPD self._display = EPD() self._display.init() self._display.clear() diff --git a/pwnagotchi/ui/hw/waveshare1in54.py b/pwnagotchi/ui/hw/waveshare1in54.py index 02a9e576..c39c9df6 100644 --- a/pwnagotchi/ui/hw/waveshare1in54.py +++ b/pwnagotchi/ui/hw/waveshare1in54.py @@ -32,7 +32,7 @@ class Waveshare154(DisplayImpl): def initialize(self): logging.info("initializing waveshare v1in54 display") - from pwnagotchi.ui.hw.libs.waveshare.v1in54.epd1in54 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v1in54.epd1in54 import EPD self._display = EPD() self._display.init(self._display.lut_partial_update) self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare1in54_V2.py b/pwnagotchi/ui/hw/waveshare1in54_V2.py index 02cd85a3..a123f409 100644 --- a/pwnagotchi/ui/hw/waveshare1in54_V2.py +++ b/pwnagotchi/ui/hw/waveshare1in54_V2.py @@ -32,7 +32,7 @@ class Waveshare154V2(DisplayImpl): def initialize(self): logging.info("initializing waveshare1in54_v2 display") - from pwnagotchi.ui.hw.libs.waveshare.v1in54_v2.epd1in54_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v1in54_v2.epd1in54_V2 import EPD try: # Double initialization is a workaround for the display not working after a reboot, or mirrored/flipped screen self._display = EPD() diff --git a/pwnagotchi/ui/hw/waveshare1in54b.py b/pwnagotchi/ui/hw/waveshare1in54b.py index f1d6c250..c91dc75c 100644 --- a/pwnagotchi/ui/hw/waveshare1in54b.py +++ b/pwnagotchi/ui/hw/waveshare1in54b.py @@ -32,7 +32,7 @@ class Waveshare154inchb(DisplayImpl): def initialize(self): logging.info("initializing waveshare v154 display") - from pwnagotchi.ui.hw.libs.waveshare.v1in54b.epd1in54b import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v1in54b.epd1in54b import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare1in54b_V2.py b/pwnagotchi/ui/hw/waveshare1in54b_V2.py index 210fde85..a1bf8e76 100644 --- a/pwnagotchi/ui/hw/waveshare1in54b_V2.py +++ b/pwnagotchi/ui/hw/waveshare1in54b_V2.py @@ -32,7 +32,7 @@ class Waveshare154bV2(DisplayImpl): def initialize(self): logging.info("initializing waveshare v154 display") - from pwnagotchi.ui.hw.libs.waveshare.v1in54b_v2.epd1in54b_v2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v1in54b_v2.epd1in54b_v2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare1in54c.py b/pwnagotchi/ui/hw/waveshare1in54c.py index 8b206f7a..3001514d 100644 --- a/pwnagotchi/ui/hw/waveshare1in54c.py +++ b/pwnagotchi/ui/hw/waveshare1in54c.py @@ -32,7 +32,7 @@ class Waveshare1in54c(DisplayImpl): def initialize(self): logging.info("initializing waveshare 1.54c inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v1in54c.epd1in54c import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v1in54c.epd1in54c import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare1in64g.py b/pwnagotchi/ui/hw/waveshare1in64g.py index c84cac6e..55b9965e 100644 --- a/pwnagotchi/ui/hw/waveshare1in64g.py +++ b/pwnagotchi/ui/hw/waveshare1in64g.py @@ -32,7 +32,7 @@ class Waveshare1in64g(DisplayImpl): def initialize(self): logging.info("initializing waveshare 1.64g inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v1in64g.epd1in64g import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v1in64g.epd1in64g import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in13.py b/pwnagotchi/ui/hw/waveshare2in13.py index b720b555..0dd2869f 100644 --- a/pwnagotchi/ui/hw/waveshare2in13.py +++ b/pwnagotchi/ui/hw/waveshare2in13.py @@ -32,7 +32,7 @@ class WaveshareV1(DisplayImpl): def initialize(self): logging.info("initializing waveshare v2in13_V1 display in monochromatic mode") - from pwnagotchi.ui.hw.libs.waveshare.v2in13_V1.epd2in13 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13_V1.epd2in13 import EPD self._display = EPD() self._display.init(self._display.lut_full_update) self._display.Clear(0xFF) diff --git a/pwnagotchi/ui/hw/waveshare2in13_V2.py b/pwnagotchi/ui/hw/waveshare2in13_V2.py index 48042746..ac8bb0f6 100644 --- a/pwnagotchi/ui/hw/waveshare2in13_V2.py +++ b/pwnagotchi/ui/hw/waveshare2in13_V2.py @@ -32,7 +32,7 @@ class WaveshareV2(DisplayImpl): def initialize(self): logging.info("initializing waveshare v2in13_V2 display") - from pwnagotchi.ui.hw.libs.waveshare.v2in13_V2.epd2in13_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13_V2.epd2in13_V2 import EPD self._display = EPD() self._display.init(self._display.FULL_UPDATE) self._display.Clear(0xff) diff --git a/pwnagotchi/ui/hw/waveshare2in13_V3.py b/pwnagotchi/ui/hw/waveshare2in13_V3.py index 86299af0..8c5bcd0a 100644 --- a/pwnagotchi/ui/hw/waveshare2in13_V3.py +++ b/pwnagotchi/ui/hw/waveshare2in13_V3.py @@ -33,7 +33,7 @@ class WaveshareV3(DisplayImpl): def initialize(self): logging.info("initializing waveshare v2in13_V3 display") - from pwnagotchi.ui.hw.libs.waveshare.v2in13_V3.epd2in13_V3 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13_V3.epd2in13_V3 import EPD self._display = EPD() self._display.init() self._display.Clear(0xFF) diff --git a/pwnagotchi/ui/hw/waveshare2in13_V4.py b/pwnagotchi/ui/hw/waveshare2in13_V4.py index 3fb425b0..ed07fbd9 100644 --- a/pwnagotchi/ui/hw/waveshare2in13_V4.py +++ b/pwnagotchi/ui/hw/waveshare2in13_V4.py @@ -32,7 +32,7 @@ class WaveshareV4(DisplayImpl): def initialize(self): logging.info("initializing waveshare v2in13_V4 display") - from pwnagotchi.ui.hw.libs.waveshare.v2in13_V4.epd2in13_V4 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13_V4.epd2in13_V4 import EPD self._display = EPD() self._display.init() self._display.Clear(0xFF) diff --git a/pwnagotchi/ui/hw/waveshare2in13b_V3.py b/pwnagotchi/ui/hw/waveshare2in13b_V3.py index 794c1bbd..c3e8d5cf 100644 --- a/pwnagotchi/ui/hw/waveshare2in13b_V3.py +++ b/pwnagotchi/ui/hw/waveshare2in13b_V3.py @@ -33,7 +33,7 @@ class Waveshare2in13bV3(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2.13inb v2in13_V3 display") - from pwnagotchi.ui.hw.libs.waveshare.v2in13b_v3.epd2in13b_V3 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13b_v3.epd2in13b_V3 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in13b_V4.py b/pwnagotchi/ui/hw/waveshare2in13b_V4.py index 27ada3a4..3bd00a92 100644 --- a/pwnagotchi/ui/hw/waveshare2in13b_V4.py +++ b/pwnagotchi/ui/hw/waveshare2in13b_V4.py @@ -33,7 +33,7 @@ class Waveshare213bV4(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2.13inb v2in13_V4 display") - from pwnagotchi.ui.hw.libs.waveshare.v2in13b_v4.epd2in13b_V4 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13b_v4.epd2in13b_V4 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in13bc.py b/pwnagotchi/ui/hw/waveshare2in13bc.py index 0f6ee0a0..a443fa14 100644 --- a/pwnagotchi/ui/hw/waveshare2in13bc.py +++ b/pwnagotchi/ui/hw/waveshare2in13bc.py @@ -32,7 +32,7 @@ class Waveshare213bc(DisplayImpl): def initialize(self): logging.info("initializing waveshare 213bc display") - from pwnagotchi.ui.hw.libs.waveshare.v2in13bc.epd2in13bc import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13bc.epd2in13bc import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in13d.py b/pwnagotchi/ui/hw/waveshare2in13d.py index 131872fb..a55b75bc 100644 --- a/pwnagotchi/ui/hw/waveshare2in13d.py +++ b/pwnagotchi/ui/hw/waveshare2in13d.py @@ -32,7 +32,7 @@ class Waveshare213d(DisplayImpl): def initialize(self): logging.info("initializing waveshare 213d display") - from pwnagotchi.ui.hw.libs.waveshare.v2in13d.epd2in13d import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13d.epd2in13d import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in13g.py b/pwnagotchi/ui/hw/waveshare2in13g.py index e964a3f1..87021a5d 100644 --- a/pwnagotchi/ui/hw/waveshare2in13g.py +++ b/pwnagotchi/ui/hw/waveshare2in13g.py @@ -32,7 +32,7 @@ class Waveshare2in13g(DisplayImpl): def initialize(self): logging.info("initializing waveshare v2in13g display") - from pwnagotchi.ui.hw.libs.waveshare.v2in13g.epd2in13g import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in13g.epd2in13g import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in36g.py b/pwnagotchi/ui/hw/waveshare2in36g.py index 2157d1f8..0353b50c 100644 --- a/pwnagotchi/ui/hw/waveshare2in36g.py +++ b/pwnagotchi/ui/hw/waveshare2in36g.py @@ -32,7 +32,7 @@ class Waveshare2in36g(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2.36g inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v2in36g.epd2in36g import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in36g.epd2in36g import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in66.py b/pwnagotchi/ui/hw/waveshare2in66.py index 0d58667b..6aedbfec 100644 --- a/pwnagotchi/ui/hw/waveshare2in66.py +++ b/pwnagotchi/ui/hw/waveshare2in66.py @@ -32,7 +32,7 @@ class Waveshare2in66(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2.66 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v2in66.epd2in66 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in66.epd2in66 import EPD self._display = EPD() self._display.init(1) self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in66b.py b/pwnagotchi/ui/hw/waveshare2in66b.py index e81d8a43..665773b9 100644 --- a/pwnagotchi/ui/hw/waveshare2in66b.py +++ b/pwnagotchi/ui/hw/waveshare2in66b.py @@ -32,7 +32,7 @@ class Waveshare2in66b(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2.66b inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v2in66b.epd2in66b import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in66b.epd2in66b import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in66g.py b/pwnagotchi/ui/hw/waveshare2in66g.py index 6279487e..2262cc0a 100644 --- a/pwnagotchi/ui/hw/waveshare2in66g.py +++ b/pwnagotchi/ui/hw/waveshare2in66g.py @@ -32,7 +32,7 @@ class Waveshare2in66g(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2.66 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v2in66g.epd2in66g import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in66g.epd2in66g import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in7.py b/pwnagotchi/ui/hw/waveshare2in7.py index 390ed055..1cffe3f2 100644 --- a/pwnagotchi/ui/hw/waveshare2in7.py +++ b/pwnagotchi/ui/hw/waveshare2in7.py @@ -32,7 +32,7 @@ class Waveshare27inch(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2.7 V1 inch display") - from pwnagotchi.ui.hw.libs.waveshare.v2in7.epd2in7 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in7.epd2in7 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in7_V2.py b/pwnagotchi/ui/hw/waveshare2in7_V2.py index 60679835..e467948a 100644 --- a/pwnagotchi/ui/hw/waveshare2in7_V2.py +++ b/pwnagotchi/ui/hw/waveshare2in7_V2.py @@ -32,7 +32,7 @@ class Waveshare27inchV2(DisplayImpl): def initialize(self): logging.info("initializing waveshare V2 2.7 inch display") - from pwnagotchi.ui.hw.libs.waveshare.v2in7_v2.epd2in7_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in7_v2.epd2in7_V2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in7b.py b/pwnagotchi/ui/hw/waveshare2in7b.py index 1dc96dbd..3a986419 100644 --- a/pwnagotchi/ui/hw/waveshare2in7b.py +++ b/pwnagotchi/ui/hw/waveshare2in7b.py @@ -32,7 +32,7 @@ class Waveshare27b(DisplayImpl): def initialize(self): logging.info("initializing waveshare V1 2.7b inch display") - from pwnagotchi.ui.hw.libs.waveshare.v2in7b.epd2in7b import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in7b.epd2in7b import EPD self._display = EPD() self._display.init() self._display.Clear(0xFF) diff --git a/pwnagotchi/ui/hw/waveshare2in7b_V2.py b/pwnagotchi/ui/hw/waveshare2in7b_V2.py index 157ce978..d094b439 100644 --- a/pwnagotchi/ui/hw/waveshare2in7b_V2.py +++ b/pwnagotchi/ui/hw/waveshare2in7b_V2.py @@ -32,7 +32,7 @@ class Waveshare27bV2(DisplayImpl): def initialize(self): logging.info("initializing waveshare V1 2.7b inch display") - from pwnagotchi.ui.hw.libs.waveshare.v2in7b_v2.epd2in7b_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in7b_v2.epd2in7b_V2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in9.py b/pwnagotchi/ui/hw/waveshare2in9.py index 76cd76c9..0c2ee92b 100644 --- a/pwnagotchi/ui/hw/waveshare2in9.py +++ b/pwnagotchi/ui/hw/waveshare2in9.py @@ -32,7 +32,7 @@ class Waveshare29inch(DisplayImpl): def initialize(self): logging.info("initializing waveshare V1 2.9 inch display") - from pwnagotchi.ui.hw.libs.waveshare.v2in9.epd2in9 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in9.epd2in9 import EPD self._display = EPD() self._display.init(self._display.lut_full_update) self._display.Clear(0xFF) diff --git a/pwnagotchi/ui/hw/waveshare2in9_V2.py b/pwnagotchi/ui/hw/waveshare2in9_V2.py index 0e537a11..5d7b1add 100644 --- a/pwnagotchi/ui/hw/waveshare2in9_V2.py +++ b/pwnagotchi/ui/hw/waveshare2in9_V2.py @@ -32,7 +32,7 @@ class Waveshare29inchV2(DisplayImpl): def initialize(self): logging.info("initializing waveshare V2 2.9 inch display") - from pwnagotchi.ui.hw.libs.waveshare.v2in9_v2.epd2in9V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in9_v2.epd2in9V2 import EPD self._display = EPD() self._display.init() self._display.Clear(0xFF) diff --git a/pwnagotchi/ui/hw/waveshare2in9b_V3.py b/pwnagotchi/ui/hw/waveshare2in9b_V3.py index 7505e502..7edf34c5 100644 --- a/pwnagotchi/ui/hw/waveshare2in9b_V3.py +++ b/pwnagotchi/ui/hw/waveshare2in9b_V3.py @@ -32,7 +32,7 @@ class Waveshare29bV3(DisplayImpl): def initialize(self): logging.info("initializing waveshare V3 2.9 inch display") - from pwnagotchi.ui.hw.libs.waveshare.v2in9b_v3.epd2in9b_V3 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in9b_v3.epd2in9b_V3 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in9b_V4.py b/pwnagotchi/ui/hw/waveshare2in9b_V4.py index 58d0aaf2..d3e0fc60 100644 --- a/pwnagotchi/ui/hw/waveshare2in9b_V4.py +++ b/pwnagotchi/ui/hw/waveshare2in9b_V4.py @@ -32,7 +32,7 @@ class Waveshare29bV4(DisplayImpl): def initialize(self): logging.info("initializing waveshare V4 2.9 inch display") - from pwnagotchi.ui.hw.libs.waveshare.v2in9b_v4.epd2in9b_V4 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in9b_v4.epd2in9b_V4 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in9bc.py b/pwnagotchi/ui/hw/waveshare2in9bc.py index 804000b0..5fdc5f08 100644 --- a/pwnagotchi/ui/hw/waveshare2in9bc.py +++ b/pwnagotchi/ui/hw/waveshare2in9bc.py @@ -32,7 +32,7 @@ class Waveshare2in9bc(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2,9bc inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v2in9bc.epd2in9bc import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in9bc.epd2in9bc import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare2in9d.py b/pwnagotchi/ui/hw/waveshare2in9d.py index 47742db9..b3bcc3a4 100644 --- a/pwnagotchi/ui/hw/waveshare2in9d.py +++ b/pwnagotchi/ui/hw/waveshare2in9d.py @@ -32,7 +32,7 @@ class Waveshare2in9d(DisplayImpl): def initialize(self): logging.info("initializing waveshare 2.9d inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v2in9d.epd2in9d import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v2in9d.epd2in9d import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare35lcd.py b/pwnagotchi/ui/hw/waveshare35lcd.py deleted file mode 100644 index 76df79de..00000000 --- a/pwnagotchi/ui/hw/waveshare35lcd.py +++ /dev/null @@ -1,52 +0,0 @@ -import logging - -import pwnagotchi.ui.fonts as fonts -from pwnagotchi.ui.hw.base import DisplayImpl - -import os, time - - -class Waveshare35lcd(DisplayImpl): - def __init__(self, config): - super(Waveshare35lcd, self).__init__(config, 'waveshare35lcd') - - def layout(self): - fonts.setup(12, 10, 12, 70, 25, 9) - self._layout['width'] = 480 - self._layout['height'] = 320 - self._layout['face'] = (110, 100) - self._layout['name'] = (10, 30) - self._layout['channel'] = (0, 0) - self._layout['aps'] = (80, 0) - self._layout['uptime'] = (400, 0) - self._layout['line1'] = [0, 14, 480, 14] - self._layout['line2'] = [0,300, 480, 300] - self._layout['friend_face'] = (0, 220) - self._layout['friend_name'] = (50, 225) - self._layout['shakes'] = (10, 300) - self._layout['mode'] = (440, 300) - self._layout['status'] = { - 'pos': (80, 200), - 'font': fonts.status_font(fonts.Medium), - 'max': 100 - } - - return self._layout - - def refresh(self): - time.sleep(0.1) - - def initialize(self): - from pwnagotchi.ui.hw.libs.fb import fb - self._display = fb - logging.info("initializing waveshare 3,5inch lcd display") - self._display.ready_fb(i=0) - self._display.black_scr() - - def render(self, canvas): - self._display.show_img(canvas.rotate(0)) - self.refresh() - - def clear(self): - self._display.black_scr() - self.refresh() diff --git a/pwnagotchi/ui/hw/waveshare3in0g.py b/pwnagotchi/ui/hw/waveshare3in0g.py index d8a79e28..11c16a64 100644 --- a/pwnagotchi/ui/hw/waveshare3in0g.py +++ b/pwnagotchi/ui/hw/waveshare3in0g.py @@ -32,7 +32,7 @@ class Waveshare3in0g(DisplayImpl): def initialize(self): logging.info("initializing waveshare 3.00g inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v3in0g.epd3in0g import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v3in0g.epd3in0g import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare3in52.py b/pwnagotchi/ui/hw/waveshare3in52.py index 0b502279..ffc58421 100644 --- a/pwnagotchi/ui/hw/waveshare3in52.py +++ b/pwnagotchi/ui/hw/waveshare3in52.py @@ -32,7 +32,7 @@ class Waveshare3in52(DisplayImpl): def initialize(self): logging.info("initializing waveshare 3.52 inch display") - from pwnagotchi.ui.hw.libs.waveshare.v3in52.epd3in52 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v3in52.epd3in52 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare3in5lcd.py b/pwnagotchi/ui/hw/waveshare3in5lcd.py index 76df79de..ecc8cf8f 100644 --- a/pwnagotchi/ui/hw/waveshare3in5lcd.py +++ b/pwnagotchi/ui/hw/waveshare3in5lcd.py @@ -1,10 +1,9 @@ import logging +import time import pwnagotchi.ui.fonts as fonts from pwnagotchi.ui.hw.base import DisplayImpl -import os, time - class Waveshare35lcd(DisplayImpl): def __init__(self, config): diff --git a/pwnagotchi/ui/hw/waveshare3in7.py b/pwnagotchi/ui/hw/waveshare3in7.py index 32523c16..2b2cf155 100644 --- a/pwnagotchi/ui/hw/waveshare3in7.py +++ b/pwnagotchi/ui/hw/waveshare3in7.py @@ -32,7 +32,7 @@ class Waveshare3in7(DisplayImpl): def initialize(self): logging.info("initializing waveshare 3.7 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v3in7.epd3in7 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v3in7.epd3in7 import EPD self._display = EPD() self._display.init(0) self._display.Clear(0) diff --git a/pwnagotchi/ui/hw/waveshare4in01f.py b/pwnagotchi/ui/hw/waveshare4in01f.py index 6951567c..74dca6c0 100644 --- a/pwnagotchi/ui/hw/waveshare4in01f.py +++ b/pwnagotchi/ui/hw/waveshare4in01f.py @@ -32,7 +32,7 @@ class Waveshare4in01f(DisplayImpl): def initialize(self): logging.info("initializing waveshare 4.01f inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v4in01f.epd4in01f import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v4in01f.epd4in01f import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare4in2.py b/pwnagotchi/ui/hw/waveshare4in2.py index c5dc8b71..a709f34b 100644 --- a/pwnagotchi/ui/hw/waveshare4in2.py +++ b/pwnagotchi/ui/hw/waveshare4in2.py @@ -32,7 +32,7 @@ class Waveshare4in2(DisplayImpl): def initialize(self): logging.info("initializing waveshare 4.2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v4in2.epd4in2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v4in2.epd4in2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare4in26.py b/pwnagotchi/ui/hw/waveshare4in26.py index 1abc92fc..5c25595c 100644 --- a/pwnagotchi/ui/hw/waveshare4in26.py +++ b/pwnagotchi/ui/hw/waveshare4in26.py @@ -32,7 +32,7 @@ class Waveshare4in26(DisplayImpl): def initialize(self): logging.info("initializing waveshare 4.26 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v4in26.epd4in26 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v4in26.epd4in26 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare4in2_V2.py b/pwnagotchi/ui/hw/waveshare4in2_V2.py index 27ac21ec..0e6a1762 100644 --- a/pwnagotchi/ui/hw/waveshare4in2_V2.py +++ b/pwnagotchi/ui/hw/waveshare4in2_V2.py @@ -32,7 +32,7 @@ class Waveshare4in2V2(DisplayImpl): def initialize(self): logging.info("initializing waveshare 4.2 V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v4in2_v2.epd4in2_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v4in2_v2.epd4in2_V2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare4in2b_V2.py b/pwnagotchi/ui/hw/waveshare4in2b_V2.py index 9569cfce..914e1eca 100644 --- a/pwnagotchi/ui/hw/waveshare4in2b_V2.py +++ b/pwnagotchi/ui/hw/waveshare4in2b_V2.py @@ -32,7 +32,7 @@ class Waveshare4in2bV2(DisplayImpl): def initialize(self): logging.info("initializing waveshare 4.2b V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v4in2b_v2.epd4in2b_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v4in2b_v2.epd4in2b_V2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare4in2bc.py b/pwnagotchi/ui/hw/waveshare4in2bc.py index 623a603a..7f6bf4ce 100644 --- a/pwnagotchi/ui/hw/waveshare4in2bc.py +++ b/pwnagotchi/ui/hw/waveshare4in2bc.py @@ -32,7 +32,7 @@ class Waveshare4in2bc(DisplayImpl): def initialize(self): logging.info("initializing waveshare 4.2bc V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v4in2bc.epd4in2bc import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v4in2bc.epd4in2bc import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare4in37g.py b/pwnagotchi/ui/hw/waveshare4in37g.py index 3bc58503..19a70ae7 100644 --- a/pwnagotchi/ui/hw/waveshare4in37g.py +++ b/pwnagotchi/ui/hw/waveshare4in37g.py @@ -32,7 +32,7 @@ class Waveshare4in37g(DisplayImpl): def initialize(self): logging.info("initializing waveshare 4.37g inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v4in37g.epd4in37g import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v4in37g.epd4in37g import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare5in65f.py b/pwnagotchi/ui/hw/waveshare5in65f.py index a06acf5d..2d46258c 100644 --- a/pwnagotchi/ui/hw/waveshare5in65f.py +++ b/pwnagotchi/ui/hw/waveshare5in65f.py @@ -32,7 +32,7 @@ class Waveshare5in65f(DisplayImpl): def initialize(self): logging.info("initializing waveshare 5.65f inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v5in65f.epd5in65f import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v5in65f.epd5in65f import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare5in79.py b/pwnagotchi/ui/hw/waveshare5in79.py index b27cd295..e9369b97 100644 --- a/pwnagotchi/ui/hw/waveshare5in79.py +++ b/pwnagotchi/ui/hw/waveshare5in79.py @@ -32,7 +32,7 @@ class Waveshare5in79(DisplayImpl): def initialize(self): logging.info("initializing waveshare 5.79 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v5in79.epd5in79 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v5in79.epd5in79 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare5in79b.py b/pwnagotchi/ui/hw/waveshare5in79b.py index 5c0d5911..e8ef4e86 100644 --- a/pwnagotchi/ui/hw/waveshare5in79b.py +++ b/pwnagotchi/ui/hw/waveshare5in79b.py @@ -32,7 +32,7 @@ class Waveshare5in79b(DisplayImpl): def initialize(self): logging.info("initializing waveshare 5.79b inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v5in79b.epd5in79b import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v5in79b.epd5in79b import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare5in83.py b/pwnagotchi/ui/hw/waveshare5in83.py index aeadd918..01a88085 100644 --- a/pwnagotchi/ui/hw/waveshare5in83.py +++ b/pwnagotchi/ui/hw/waveshare5in83.py @@ -32,7 +32,7 @@ class Waveshare5in83(DisplayImpl): def initialize(self): logging.info("initializing waveshare 5.83 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v5in83.epd5in83 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v5in83.epd5in83 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare5in83_V2.py b/pwnagotchi/ui/hw/waveshare5in83_V2.py index c37c9eb2..8a077003 100644 --- a/pwnagotchi/ui/hw/waveshare5in83_V2.py +++ b/pwnagotchi/ui/hw/waveshare5in83_V2.py @@ -32,7 +32,7 @@ class Waveshare5in83V2(DisplayImpl): def initialize(self): logging.info("initializing waveshare 5.83 V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v5in83_v2.epd5in83_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v5in83_v2.epd5in83_V2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare5in83b_V2.py b/pwnagotchi/ui/hw/waveshare5in83b_V2.py index 79fe7599..99d7a6e9 100644 --- a/pwnagotchi/ui/hw/waveshare5in83b_V2.py +++ b/pwnagotchi/ui/hw/waveshare5in83b_V2.py @@ -32,7 +32,7 @@ class Waveshare5in83bV2(DisplayImpl): def initialize(self): logging.info("initializing waveshare 5.83b V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v5in83b_v2.epd5in83b_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v5in83b_v2.epd5in83b_V2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare5in83bc.py b/pwnagotchi/ui/hw/waveshare5in83bc.py index 342f59dd..dc0e117a 100644 --- a/pwnagotchi/ui/hw/waveshare5in83bc.py +++ b/pwnagotchi/ui/hw/waveshare5in83bc.py @@ -32,7 +32,7 @@ class Waveshare5in83bc(DisplayImpl): def initialize(self): logging.info("initializing waveshare 5.83bc inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v5in83bc.epd5in83bc import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v5in83bc.epd5in83bc import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare7in3f.py b/pwnagotchi/ui/hw/waveshare7in3f.py index 7f1317d5..56882f8d 100644 --- a/pwnagotchi/ui/hw/waveshare7in3f.py +++ b/pwnagotchi/ui/hw/waveshare7in3f.py @@ -32,7 +32,7 @@ class Waveshare7in3f(DisplayImpl): def initialize(self): logging.info("initializing waveshare 7.3f inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in3f.epd7in3f import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in3f.epd7in3f import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare7in3g.py b/pwnagotchi/ui/hw/waveshare7in3g.py index 5465cdbd..1c14f068 100644 --- a/pwnagotchi/ui/hw/waveshare7in3g.py +++ b/pwnagotchi/ui/hw/waveshare7in3g.py @@ -32,7 +32,7 @@ class Waveshare7in3g(DisplayImpl): def initialize(self): logging.info("initializing waveshare 7.3g inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in3g.epd7in3g import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in3g.epd7in3g import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare7in5.py b/pwnagotchi/ui/hw/waveshare7in5.py index 6c756d95..d91e8bf9 100644 --- a/pwnagotchi/ui/hw/waveshare7in5.py +++ b/pwnagotchi/ui/hw/waveshare7in5.py @@ -32,7 +32,7 @@ class Waveshare7in5(DisplayImpl): def initialize(self): logging.info("initializing waveshare 7.5 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in5.epd7in5 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in5.epd7in5 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare7in5_HD.py b/pwnagotchi/ui/hw/waveshare7in5_HD.py index 2004889a..45d07159 100644 --- a/pwnagotchi/ui/hw/waveshare7in5_HD.py +++ b/pwnagotchi/ui/hw/waveshare7in5_HD.py @@ -32,7 +32,7 @@ class Waveshare7in5HD(DisplayImpl): def initialize(self): logging.info("initializing waveshare 7.5HD inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in5_HD.epd7in5_HD import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in5_HD.epd7in5_HD import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare7in5_V2.py b/pwnagotchi/ui/hw/waveshare7in5_V2.py index 3d11ab03..b6da3f63 100644 --- a/pwnagotchi/ui/hw/waveshare7in5_V2.py +++ b/pwnagotchi/ui/hw/waveshare7in5_V2.py @@ -33,19 +33,19 @@ class Waveshare7in5V2(DisplayImpl): def initialize(self): if self.config['color'] == 'fast': logging.info("initializing waveshare 7.5 V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in5_v2.epd7in5_V2_fast import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in5_v2.epd7in5_V2_fast import EPD self._display = EPD() self._display.init() self._display.Clear() elif self.config['color'] == 'old': logging.info("initializing waveshare 7.5 V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in5_v2.epd7in5_V2_old import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in5_v2.epd7in5_V2_old import EPD self._display = EPD() self._display.init() self._display.Clear() else: logging.info("initializing waveshare 7.5 V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in5_v2.epd7in5_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in5_v2.epd7in5_V2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare7in5b_HD.py b/pwnagotchi/ui/hw/waveshare7in5b_HD.py index 550ef2f5..13a2e99f 100644 --- a/pwnagotchi/ui/hw/waveshare7in5b_HD.py +++ b/pwnagotchi/ui/hw/waveshare7in5b_HD.py @@ -32,7 +32,7 @@ class Waveshare7in5bHD(DisplayImpl): def initialize(self): logging.info("initializing waveshare 7.5b HD inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in5b_HD.epd7in5b_HD import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in5b_HD.epd7in5b_HD import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare7in5b_V2.py b/pwnagotchi/ui/hw/waveshare7in5b_V2.py index c7463c0a..098ee2d7 100644 --- a/pwnagotchi/ui/hw/waveshare7in5b_V2.py +++ b/pwnagotchi/ui/hw/waveshare7in5b_V2.py @@ -32,7 +32,7 @@ class Waveshare7in5bV2(DisplayImpl): def initialize(self): logging.info("initializing waveshare 7.5b V2 inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in5b_v2.epd7in5b_V2 import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in5b_v2.epd7in5b_V2 import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshare7in5bc.py b/pwnagotchi/ui/hw/waveshare7in5bc.py index 3df29469..9e0b7139 100644 --- a/pwnagotchi/ui/hw/waveshare7in5bc.py +++ b/pwnagotchi/ui/hw/waveshare7in5bc.py @@ -32,7 +32,7 @@ class Waveshare7in5bc(DisplayImpl): def initialize(self): logging.info("initializing waveshare 7.5bc inch lcd display") - from pwnagotchi.ui.hw.libs.waveshare.v7in5bc.epd7in5bc import EPD + from pwnagotchi.ui.hw.libs.waveshare.epaper.v7in5bc.epd7in5bc import EPD self._display = EPD() self._display.init() self._display.Clear() diff --git a/pwnagotchi/ui/hw/waveshareoledlcd.py b/pwnagotchi/ui/hw/waveshareoledlcd.py index d69a762d..19e58b31 100644 --- a/pwnagotchi/ui/hw/waveshareoledlcd.py +++ b/pwnagotchi/ui/hw/waveshareoledlcd.py @@ -49,7 +49,7 @@ class Waveshareoledlcd(DisplayImpl): def initialize(self): logging.info("initializing Waveshare OLED/LCD hat") - from pwnagotchi.ui.hw.libs.waveshare.oledlcd.ST7789 import ST7789 + from pwnagotchi.ui.hw.libs.waveshare.oled.oledlcd.ST7789 import ST7789 self._display = ST7789(0,0,22,18) def render(self, canvas):