epdlib 0.6.3.1__tar.gz → 0.6.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/PKG-INFO +1 -1
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib/Screen.py +35 -6
- epdlib-0.6.3.2/epdlib/version.py +1 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib.egg-info/PKG-INFO +1 -1
- epdlib-0.6.3.1/epdlib/version.py +0 -1
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/LICENSE +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/README.md +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib/Block.py +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib/Layout.py +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib/__init__.py +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib/constants.py +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib.egg-info/SOURCES.txt +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib.egg-info/dependency_links.txt +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib.egg-info/requires.txt +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/epdlib.egg-info/top_level.txt +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/setup.cfg +0 -0
- {epdlib-0.6.3.1 → epdlib-0.6.3.2}/setup.py +0 -0
|
@@ -26,6 +26,7 @@ import logging
|
|
|
26
26
|
from PIL import Image, ImageDraw, ImageOps, ImageColor
|
|
27
27
|
from datetime import datetime
|
|
28
28
|
from pathlib import Path
|
|
29
|
+
from gpiozero import GPIODeviceError
|
|
29
30
|
import time
|
|
30
31
|
|
|
31
32
|
try:
|
|
@@ -33,7 +34,7 @@ try:
|
|
|
33
34
|
except ImportError as e:
|
|
34
35
|
import constants
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
from waveshare_epd import epdconfig
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
# + code_folding=[0]
|
|
@@ -724,7 +725,13 @@ class Screen():
|
|
|
724
725
|
if self.HD:
|
|
725
726
|
pass
|
|
726
727
|
else:
|
|
727
|
-
self.epd.module_exit(cleanup=True)
|
|
728
|
+
# self.epd.module_exit(cleanup=True)
|
|
729
|
+
logging.info('shutting down epd interface')
|
|
730
|
+
try:
|
|
731
|
+
epdconfig.module_exit(cleanup=True)
|
|
732
|
+
except GPIODeviceError as e:
|
|
733
|
+
logging.warning(f'failed to sleep module: {e}')
|
|
734
|
+
raise ScreenError(e)
|
|
728
735
|
|
|
729
736
|
|
|
730
737
|
# + code_folding=[]
|
|
@@ -915,7 +922,9 @@ def main():
|
|
|
915
922
|
print(f"using font: {myLayout['title']['font']}")
|
|
916
923
|
s = Screen(epd=myepd, vcom=voltage, mode='RGB')
|
|
917
924
|
|
|
918
|
-
for r in [0, 90, 180]:
|
|
925
|
+
# for r in [0, 90, 180]:
|
|
926
|
+
for r in [0]:
|
|
927
|
+
do_exit = False
|
|
919
928
|
print(f'setup for rotation: {r}')
|
|
920
929
|
s.rotation = r
|
|
921
930
|
l = Layout(resolution=s.resolution)
|
|
@@ -931,11 +940,19 @@ def main():
|
|
|
931
940
|
print(f'{e}')
|
|
932
941
|
print('Try: $ raspi-config > Interface Options > SPI')
|
|
933
942
|
do_exit = True
|
|
943
|
+
except ScreenError as e:
|
|
944
|
+
print(f'failed to write to screen: {e}')
|
|
945
|
+
do_ext = True
|
|
934
946
|
else:
|
|
935
947
|
do_exit = False
|
|
936
948
|
|
|
937
949
|
if do_exit:
|
|
950
|
+
try:
|
|
951
|
+
s.module_exit()
|
|
952
|
+
except Exception:
|
|
953
|
+
pass
|
|
938
954
|
sys.exit()
|
|
955
|
+
|
|
939
956
|
print('sleeping for 2 seconds')
|
|
940
957
|
time.sleep(2)
|
|
941
958
|
|
|
@@ -944,13 +961,25 @@ def main():
|
|
|
944
961
|
print('mirror output')
|
|
945
962
|
s.mirror = True
|
|
946
963
|
s.rotation = 0
|
|
947
|
-
|
|
964
|
+
try:
|
|
965
|
+
s.writeEPD(l.concat())
|
|
966
|
+
except ScreenError as e:
|
|
967
|
+
print(f'failed to write to screen: {e}')
|
|
968
|
+
sys.exit()
|
|
948
969
|
time.sleep(3)
|
|
949
970
|
|
|
950
971
|
print('clear screen')
|
|
951
|
-
|
|
952
|
-
|
|
972
|
+
try:
|
|
973
|
+
s.clearEPD()
|
|
974
|
+
print('shutting down interface')
|
|
975
|
+
s.module_exit()
|
|
976
|
+
except Exception as e:
|
|
977
|
+
print(e)
|
|
953
978
|
# -
|
|
954
979
|
|
|
955
980
|
if __name__ == '__main__':
|
|
956
981
|
e= main()
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__="0.6.3.2"
|
epdlib-0.6.3.1/epdlib/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__="0.6.3.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|