From ae365b7111edf8969e8a1759c7588051debcc77e Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 9 Sep 2022 02:35:54 +0200 Subject: [PATCH 1/4] fix for 12.48" epd --- inkycal/display/drivers/epd_12_in_48.py | 6 ------ inkycal/display/drivers/epd_12_in_48_colour.py | 10 ---------- inkycal/display/drivers/epdconfig_12_in_48.py | 18 +++++------------- 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a/inkycal/display/drivers/epd_12_in_48.py b/inkycal/display/drivers/epd_12_in_48.py index 52c82e6..334f121 100644 --- a/inkycal/display/drivers/epd_12_in_48.py +++ b/inkycal/display/drivers/epd_12_in_48.py @@ -151,7 +151,6 @@ class EPD(object): return buf def display(self, buf): - start = time.clock() #M1 part 648*492 self.M1_SendCommand(0x13) @@ -177,13 +176,10 @@ class EPD(object): for x in range(0, 81): self.S2_SendData(buf[y*163 + x]) - end = time.clock() - print("use time:%f"%(end - start)) self.TurnOnDisplay() def clear(self): """Clear contents of image buffer""" - start = time.clock() self.M1_SendCommand(0x13) for y in range(492, 984): for x in range(0, 81): @@ -203,8 +199,6 @@ class EPD(object): for y in range(0, 492): for x in range(0, 81): self.S2_SendData(0xff) - end = time.clock() - print("use time:%f"%(end - start)) self.TurnOnDisplay() """ M1S1M2S2 Write register address and data """ diff --git a/inkycal/display/drivers/epd_12_in_48_colour.py b/inkycal/display/drivers/epd_12_in_48_colour.py index 9467e8b..f364bd0 100644 --- a/inkycal/display/drivers/epd_12_in_48_colour.py +++ b/inkycal/display/drivers/epd_12_in_48_colour.py @@ -172,7 +172,6 @@ class EPD(object): return buf def display(self, blackbuf, redbuf): - start = time.clock() #S2 part 648*492 self.S2_SendCommand(0x10) @@ -213,14 +212,10 @@ class EPD(object): for y in range(492, 984): for x in range(81, 163): self.S1_SendData(~redbuf[y*163 + x]) - - end = time.clock() - print("use time: %f"%(end - start)) self.TurnOnDisplay() def clear(self): """Clear contents of image buffer""" - start = time.clock() self.S2_SendCommand(0x10) for y in range(0, 492): @@ -257,11 +252,6 @@ class EPD(object): for y in range(492, 984): for x in range(81, 163): self.S1_SendData(0x00) - - end = time.clock() - print (end) - print (start) - print("use time: %f" %(end - start)) self.TurnOnDisplay() diff --git a/inkycal/display/drivers/epdconfig_12_in_48.py b/inkycal/display/drivers/epdconfig_12_in_48.py index 4ebd371..e7740c1 100644 --- a/inkycal/display/drivers/epdconfig_12_in_48.py +++ b/inkycal/display/drivers/epdconfig_12_in_48.py @@ -53,20 +53,12 @@ EPD_S1_BUSY_PIN =19 EPD_M2_BUSY_PIN =27 EPD_S2_BUSY_PIN =24 -find_dirs = [ - os.path.dirname(os.path.realpath(__file__)), - '/usr/local/lib', - '/usr/lib', -] -spi = None -for find_dir in find_dirs: - so_filename = os.path.join(find_dir, 'epd_12_in_48_lib.so') - if os.path.exists(so_filename): - spi = CDLL(so_filename) - break -if spi is None: - RuntimeError('Cannot find epd_12_in_48_lib.so') +additional_driver_path = f"{os.getcwd()}/epd_12_in_48_lib.so" +if not os.path.exists(additional_driver_path): + RuntimeError("Inkycal cannot find the additional driver files for 12in48 3-colour") + +spi = CDLL(additional_driver_path) def digital_write(pin, value): GPIO.output(pin, value) From f85ec1b3431b323f5b2683301749542e7dd5d4ba Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 9 Sep 2022 02:41:01 +0200 Subject: [PATCH 2/4] fix path --- inkycal/display/drivers/epdconfig_12_in_48.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inkycal/display/drivers/epdconfig_12_in_48.py b/inkycal/display/drivers/epdconfig_12_in_48.py index e7740c1..4bc59a8 100644 --- a/inkycal/display/drivers/epdconfig_12_in_48.py +++ b/inkycal/display/drivers/epdconfig_12_in_48.py @@ -53,7 +53,7 @@ EPD_S1_BUSY_PIN =19 EPD_M2_BUSY_PIN =27 EPD_S2_BUSY_PIN =24 -additional_driver_path = f"{os.getcwd()}/epd_12_in_48_lib.so" +additional_driver_path = f"{os.path.dirname(os.path.realpath(__file__))}/epd_12_in_48_lib.so" if not os.path.exists(additional_driver_path): RuntimeError("Inkycal cannot find the additional driver files for 12in48 3-colour") From eb6c4c56ecafaf80ab95950f729df1186cd07223 Mon Sep 17 00:00:00 2001 From: Ace Date: Thu, 22 Sep 2022 22:28:54 +0200 Subject: [PATCH 3/4] Added latest contributors --- .github/CONTRIBUTORS.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/CONTRIBUTORS.md b/.github/CONTRIBUTORS.md index e1b1c24..9368372 100644 --- a/.github/CONTRIBUTORS.md +++ b/.github/CONTRIBUTORS.md @@ -38,7 +38,25 @@ The following people have voluteered to test the beta release (pre-release). Tha ## Financial Contributions | Name | Contribution details | | --- | --- | -| **Kevin** | A special thank you for contribution! :tada: | -| **Eric** | A special thank you for contribution! :tada: | -| **Thomas** | A special thank you for contribution! :tada: | -| **Marcel Schumann** | A special thank you for contribution! :tada: | +| **Kevin** | A special thank you for your contribution! :tada: | +| **Eric** | A special thank you for your contribution! :tada: | +| **Thomas** | A special thank you for your contribution! :tada: | +| **Marcel S.** | A special thank you for your contribution! :tada: | +| **Markus M.** | A special thank you for your contribution! :tada: | +| **Lara** | A special thank you for your contribution! :tada: | +| **Richard** | A special thank you for your contribution! :tada: | +| **[David S.](https://github.com/piimp)** | A special thank you for your contribution! :tada: | +| **Rene N** | A special thank you for your contribution! :tada: | +| **Koorathota** | A special thank you for your contribution! :tada: | +| **Christopher C.** | A special thank you for your contribution! :tada: | +| **Stefan A.** | A special thank you for your contribution! :tada: | +| **Florian B.** | A special thank you for your contribution! :tada: | +| **Achint M.** | A special thank you for your contribution! :tada: | +| **Felix J.** | A special thank you for your contribution! :tada: | +| **Michael W.** | A special thank you for your contribution! :tada: | +| **Dennis R.** | A special thank you for your contribution! :tada: | +| **Max G.** | A special thank you for your contribution! :tada: | +| **Sun L.** | A special thank you for your contribution! :tada: | +| **Martin K.** | A special thank you for your contribution! :tada: | +| **Simon K.** | A special thank you for your contribution! :tada: | +| **Roman F.** | A special thank you for your contribution! :tada: | From afdaa4d8a4ee477e44da991d92cbcc81b710aced Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 30 Sep 2022 16:55:04 +0200 Subject: [PATCH 4/4] added latest contributor --- .github/CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CONTRIBUTORS.md b/.github/CONTRIBUTORS.md index 9368372..96b5146 100644 --- a/.github/CONTRIBUTORS.md +++ b/.github/CONTRIBUTORS.md @@ -60,3 +60,4 @@ The following people have voluteered to test the beta release (pre-release). Tha | **Martin K.** | A special thank you for your contribution! :tada: | | **Simon K.** | A special thank you for your contribution! :tada: | | **Roman F.** | A special thank you for your contribution! :tada: | +| **Lars L.**| A special thank you for your contribution! :tada: |