diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py index 629cf1bb0..0cefe2814 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py @@ -120,7 +120,7 @@ '''4Gray display''' logging.info("4Gray display--------------------------------") - epd.Init_4Gray() + epd.init_4Gray() Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame draw = ImageDraw.Draw(Limage) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in7_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in7_test.py index 138e24b48..bb58da0bb 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in7_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in7_test.py @@ -75,7 +75,7 @@ '''4Gray display''' logging.info("4Gray display--------------------------------") - epd.Init_4Gray() + epd.init_4Gray() Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame draw = ImageDraw.Draw(Limage) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py index 24f694157..839168f44 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py @@ -96,7 +96,7 @@ '''4Gray display''' logging.info("4Gray display--------------------------------") - epd.Init_4Gray() + epd.init_4Gray() Limage = Image.new('L', (epd.height, epd.width), 0) # 255: clear the frame draw = ImageDraw.Draw(Limage) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_4in2_V2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_4in2_V2_test.py index 02b491ea0..fa197b8e7 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_4in2_V2_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_4in2_V2_test.py @@ -144,7 +144,7 @@ '''4Gray display''' logging.info("6.4Gray display--------------------------------") - epd.Init_4Gray() + epd.init_4Gray() Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame draw = ImageDraw.Draw(Limage) diff --git a/RaspberryPi_JetsonNano/python/examples/epd_4in2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_4in2_test.py index d56b6ec7c..f39f132c2 100644 --- a/RaspberryPi_JetsonNano/python/examples/epd_4in2_test.py +++ b/RaspberryPi_JetsonNano/python/examples/epd_4in2_test.py @@ -94,7 +94,7 @@ '''4Gray display''' logging.info("5.4Gray display--------------------------------") - epd.Init_4Gray() + epd.init_4Gray() Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame draw = ImageDraw.Draw(Limage) diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7.py index 831492b6b..24ecfc5af 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7.py @@ -295,6 +295,11 @@ def init(self): return 0 def Init_4Gray(self): + logger.warning("The 'Init_4Gray' method is deprecated, use 'init_4Gray' instead") + return self.init_4Gray() + + + def init_4Gray(self): if (epdconfig.module_init() != 0): return -1 self.reset() diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7_V2.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7_V2.py index 30074a6db..8257c63ca 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7_V2.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7_V2.py @@ -203,6 +203,11 @@ def init_Fast(self): return 0 def Init_4Gray(self): + logger.warning("The 'Init_4Gray' method is deprecated, use 'init_4Gray' instead") + return self.init_4Gray() + + + def init_4Gray(self): if (epdconfig.module_init() != 0): return -1 self.reset() diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9_V2.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9_V2.py index d84510b3c..e5d8e8f69 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9_V2.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9_V2.py @@ -291,6 +291,10 @@ def init_Fast(self): return 0 def Init_4Gray(self): + logger.warning("The 'Init_4Gray' method is deprecated, use 'init_4Gray' instead") + return self.init_4Gray() + + def init_4Gray(self): if (epdconfig.module_init() != 0): return -1 self.reset() diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in7.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in7.py index 37685680b..15fa5700e 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in7.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in7.py @@ -148,7 +148,7 @@ def ReadBusy(self): logger.debug("e-Paper busy release") - def init(self, mode): + def init(self, mode=1): if (epdconfig.module_init() != 0): return -1 # EPD hardware init start @@ -422,7 +422,8 @@ def display_1Gray(self, image): self.ReadBusy() - def Clear(self, color, mode): + '''The color argument is not supported on this screen.''' + def Clear(self, color, mode=1): self.send_command(0x4E) self.send_data(0x00) self.send_data(0x00) diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2.py index ce1d057f8..f5ebf4476 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2.py @@ -394,6 +394,10 @@ def init_Partial(self): return 0 def Init_4Gray(self): + logger.warning("The 'Init_4Gray' method is deprecated, use 'init_4Gray' instead") + return self.init_4Gray() + + def init_4Gray(self): if epdconfig.module_init() != 0: return -1 # EPD hardware init start diff --git a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2_V2.py b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2_V2.py index 105d57b2d..20dd47652 100644 --- a/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2_V2.py +++ b/RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2_V2.py @@ -264,9 +264,11 @@ def Lut(self): self.send_command(0x2c) self.send_data(self.LUT_ALL[232]) - - def Init_4Gray(self): + logger.warning("The 'Init_4Gray' method is deprecated, use 'init_4Gray' instead") + return self.init_4Gray() + + def init_4Gray(self): if epdconfig.module_init() != 0: return -1 # EPD hardware init start