Merge remote-tracking branch 'origin/feature/venv' into feature/venv

This commit is contained in:
aceisace 2022-10-02 00:49:37 +02:00
commit 49741f9618
4 changed files with 28 additions and 33 deletions

View File

@ -38,7 +38,26 @@ 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: |
| **Lars L.**| A special thank you for your contribution! :tada: |

View File

@ -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 """

View File

@ -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()

View File

@ -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.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")
spi = CDLL(additional_driver_path)
def digital_write(pin, value):
GPIO.output(pin, value)