Skip to content

Commit 6ce7fe0

Browse files
committed
Normalize method signatures across devices
1 parent ecdd8cf commit 6ce7fe0

File tree

11 files changed

+28
-9
lines changed

11 files changed

+28
-9
lines changed

RaspberryPi_JetsonNano/python/examples/epd_2in7_V2_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120

121121
'''4Gray display'''
122122
logging.info("4Gray display--------------------------------")
123-
epd.Init_4Gray()
123+
epd.init_4Gray()
124124

125125
Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame
126126
draw = ImageDraw.Draw(Limage)

RaspberryPi_JetsonNano/python/examples/epd_2in7_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
'''4Gray display'''
7777
logging.info("4Gray display--------------------------------")
78-
epd.Init_4Gray()
78+
epd.init_4Gray()
7979

8080
Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame
8181
draw = ImageDraw.Draw(Limage)

RaspberryPi_JetsonNano/python/examples/epd_2in9_V2_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696

9797
'''4Gray display'''
9898
logging.info("4Gray display--------------------------------")
99-
epd.Init_4Gray()
99+
epd.init_4Gray()
100100

101101
Limage = Image.new('L', (epd.height, epd.width), 0) # 255: clear the frame
102102
draw = ImageDraw.Draw(Limage)

RaspberryPi_JetsonNano/python/examples/epd_4in2_V2_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144

145145
'''4Gray display'''
146146
logging.info("6.4Gray display--------------------------------")
147-
epd.Init_4Gray()
147+
epd.init_4Gray()
148148

149149
Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame
150150
draw = ImageDraw.Draw(Limage)

RaspberryPi_JetsonNano/python/examples/epd_4in2_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494

9595
'''4Gray display'''
9696
logging.info("5.4Gray display--------------------------------")
97-
epd.Init_4Gray()
97+
epd.init_4Gray()
9898

9999
Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame
100100
draw = ImageDraw.Draw(Limage)

RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,11 @@ def init(self):
294294
self.set_lut()
295295
return 0
296296

297+
'''Deprecated. Use init_4Gray() instead'''
297298
def Init_4Gray(self):
299+
return self.init_4Gray()
300+
301+
def init_4Gray(self):
298302
if (epdconfig.module_init() != 0):
299303
return -1
300304
self.reset()

RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in7_V2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ def init_Fast(self):
202202
self.ReadBusy()
203203
return 0
204204

205+
'''Deprecated. Use init_4Gray() instead'''
205206
def Init_4Gray(self):
207+
return self.init_4Gray()
208+
209+
def init_4Gray(self):
206210
if (epdconfig.module_init() != 0):
207211
return -1
208212
self.reset()

RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd2in9_V2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,11 @@ def init_Fast(self):
290290
# EPD hardware init end
291291
return 0
292292

293+
'''Deprecated. Use init_4Gray() instead'''
293294
def Init_4Gray(self):
295+
return self.init_4Gray()
296+
297+
def init_4Gray(self):
294298
if (epdconfig.module_init() != 0):
295299
return -1
296300
self.reset()

RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd3in7.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def ReadBusy(self):
148148
logger.debug("e-Paper busy release")
149149

150150

151-
def init(self, mode):
151+
def init(self, mode=1):
152152
if (epdconfig.module_init() != 0):
153153
return -1
154154
# EPD hardware init start
@@ -422,7 +422,8 @@ def display_1Gray(self, image):
422422
self.ReadBusy()
423423

424424

425-
def Clear(self, color, mode):
425+
'''The color argument is not supported on this screen.'''
426+
def Clear(self, color, mode=1):
426427
self.send_command(0x4E)
427428
self.send_data(0x00)
428429
self.send_data(0x00)

RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,11 @@ def init_Partial(self):
393393
# EPD hardware init end
394394
return 0
395395

396+
'''Deprecated. Use init_4Gray() instead'''
396397
def Init_4Gray(self):
398+
return self.init_4Gray()
399+
400+
def init_4Gray(self):
397401
if epdconfig.module_init() != 0:
398402
return -1
399403
# EPD hardware init start

RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd4in2_V2.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,11 @@ def Lut(self):
264264
self.send_command(0x2c)
265265
self.send_data(self.LUT_ALL[232])
266266

267-
268-
267+
'''Deprecated. Use init_4Gray() instead'''
269268
def Init_4Gray(self):
269+
return self.init_4Gray()
270+
271+
def init_4Gray(self):
270272
if epdconfig.module_init() != 0:
271273
return -1
272274
# EPD hardware init start

0 commit comments

Comments
 (0)