Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize method signatures across devices #380

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion RaspberryPi_JetsonNano/python/examples/epd_2in7_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion RaspberryPi_JetsonNano/python/examples/epd_4in2_V2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion RaspberryPi_JetsonNano/python/examples/epd_4in2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 5 additions & 0 deletions RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7_V2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9_V2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 3 additions & 2 deletions RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in7.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2_V2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down