From 50995ae358084f0acf91f5bb83e09854e40fcc9c Mon Sep 17 00:00:00 2001 From: Ishraq Ibne Ashraf Date: Mon, 27 Jul 2020 23:37:33 +0200 Subject: [PATCH] fix_python_cleanup_exit: Fix Python cleanup and exit execution path for some examples. This fix apparently seems to be very trivial but if the user terminates an executing Python example program with CTRL+C and then leaves the display at that state then power is still applied to the display as a result of not executing the cleanup and exit path. This can damage the display eventually. --- RaspberryPi&JetsonNano/python/examples/epd_1in02_test.py | 2 +- RaspberryPi&JetsonNano/python/examples/epd_1in54b_V2_test.py | 2 +- RaspberryPi&JetsonNano/python/examples/epd_7in5_V2_test.py | 2 +- RaspberryPi&JetsonNano/python/examples/epd_7in5b_V2_test.py | 2 +- RaspberryPi&JetsonNano/python/examples/epd_7in5b_V3_test.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RaspberryPi&JetsonNano/python/examples/epd_1in02_test.py b/RaspberryPi&JetsonNano/python/examples/epd_1in02_test.py index 5e8819d..7faf26a 100644 --- a/RaspberryPi&JetsonNano/python/examples/epd_1in02_test.py +++ b/RaspberryPi&JetsonNano/python/examples/epd_1in02_test.py @@ -95,5 +95,5 @@ except IOError as e: except KeyboardInterrupt: logging.info("ctrl + c:") - epd1in54.epdconfig.module_exit() + epd1in02.epdconfig.module_exit() exit() diff --git a/RaspberryPi&JetsonNano/python/examples/epd_1in54b_V2_test.py b/RaspberryPi&JetsonNano/python/examples/epd_1in54b_V2_test.py index 22e19cb..b76278d 100644 --- a/RaspberryPi&JetsonNano/python/examples/epd_1in54b_V2_test.py +++ b/RaspberryPi&JetsonNano/python/examples/epd_1in54b_V2_test.py @@ -76,5 +76,5 @@ except IOError as e: except KeyboardInterrupt: logging.info("ctrl + c:") - epd1in54b.epdconfig.module_exit() + epd1in54b_V2.epdconfig.module_exit() exit() diff --git a/RaspberryPi&JetsonNano/python/examples/epd_7in5_V2_test.py b/RaspberryPi&JetsonNano/python/examples/epd_7in5_V2_test.py index 4a254fd..bcb8f66 100644 --- a/RaspberryPi&JetsonNano/python/examples/epd_7in5_V2_test.py +++ b/RaspberryPi&JetsonNano/python/examples/epd_7in5_V2_test.py @@ -86,5 +86,5 @@ except IOError as e: except KeyboardInterrupt: logging.info("ctrl + c:") - epd7in5.epdconfig.module_exit() + epd7in5_V2.epdconfig.module_exit() exit() diff --git a/RaspberryPi&JetsonNano/python/examples/epd_7in5b_V2_test.py b/RaspberryPi&JetsonNano/python/examples/epd_7in5b_V2_test.py index 8544371..abf211a 100644 --- a/RaspberryPi&JetsonNano/python/examples/epd_7in5b_V2_test.py +++ b/RaspberryPi&JetsonNano/python/examples/epd_7in5b_V2_test.py @@ -93,5 +93,5 @@ except IOError as e: except KeyboardInterrupt: logging.info("ctrl + c:") - epd7in5.epdconfig.module_exit() + epd7in5bc_V2.epdconfig.module_exit() exit() diff --git a/RaspberryPi&JetsonNano/python/examples/epd_7in5b_V3_test.py b/RaspberryPi&JetsonNano/python/examples/epd_7in5b_V3_test.py index f17cd8d..4b0bff6 100644 --- a/RaspberryPi&JetsonNano/python/examples/epd_7in5b_V3_test.py +++ b/RaspberryPi&JetsonNano/python/examples/epd_7in5b_V3_test.py @@ -93,5 +93,5 @@ except IOError as e: except KeyboardInterrupt: logging.info("ctrl + c:") - epd7in5.epdconfig.module_exit() + epd7in5b_V3.epdconfig.module_exit() exit()