Fixed indents
This commit is contained in:
parent
c2d345dea0
commit
a630dd2d54
3 changed files with 10 additions and 6 deletions
|
@ -3,8 +3,8 @@ from settings import display_colours
|
|||
from PIL import Image, ImageDraw
|
||||
|
||||
class Epd7in5Adapter (EpdAdapter):
|
||||
def __init__ ():
|
||||
super(Epd7in5Adapter, self).__init__(640, 384)
|
||||
def __init__ ():
|
||||
super(Epd7in5Adapter, self).__init__(640, 384)
|
||||
|
||||
def display_frame (self, frame_buffer):
|
||||
self.send_command(DATA_START_TRANSMISSION_1)
|
||||
|
|
|
@ -3,8 +3,8 @@ from settings import display_colours
|
|||
from PIL import Image, ImageDraw
|
||||
|
||||
class Epd7in5bAdapter (EpdAdapter):
|
||||
def __init__ ():
|
||||
super(Epd7in5bAdapter, self).__init__(640, 384)
|
||||
def __init__ ():
|
||||
super(Epd7in5bAdapter, self).__init__(640, 384)
|
||||
|
||||
def display_frame (self, frame_buffer):
|
||||
self.send_command(DATA_START_TRANSMISSION_1)
|
||||
|
|
|
@ -49,7 +49,7 @@ READ_VCOM_VALUE = 0x81
|
|||
VCM_DC_SETTING = 0x82
|
||||
|
||||
class EpdAdapter (DisplayAdapter):
|
||||
"""Generalized adapter for epd7in5 and epd7in5b"""
|
||||
"""Generalized adapter for epd7in5 and epd7in5b"""
|
||||
def __init__ (self, width, height):
|
||||
self.width = width
|
||||
self.height = height
|
||||
|
@ -69,12 +69,16 @@ class EpdAdapter (DisplayAdapter):
|
|||
def render (self, design):
|
||||
self.init_render()
|
||||
time.sleep(5)
|
||||
|
||||
|
||||
print('Converting image to data and sending it to the display')
|
||||
print('This may take a while...' + '\n')
|
||||
prepared_image = design.get_image().rotate(270, expand=1)
|
||||
self.display_frame(self.get_frame_buffer(prepared_image))
|
||||
|
||||
# Powering off the E-Paper until the next loop
|
||||
self.sleep()
|
||||
print('Data sent successfully')
|
||||
print('Powering off the E-Paper until the next loop' + '\n')
|
||||
|
||||
def init_render (self):
|
||||
if (self.epd_init() != 0):
|
||||
|
|
Loading…
Reference in a new issue