diff --git a/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py b/RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py index 629cf1bb..0cefe281 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 138e24b4..bb58da0b 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 24f69415..839168f4 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 02b491ea..fa197b8e 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 d56b6ec7..f39f132c 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 831492b6..24ecfc5a 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 30074a6d..8257c63c 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 d84510b3..e5d8e8f6 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 37685680..15fa5700 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 ce1d057f..f5ebf447 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 105d57b2..20dd4765 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