Fixed a bug

Fixed a bug causing an error on 2 colour displays.
(UnboundLocalError: local variable 'red' referenced before assignment)
Cause: incorrect indent block on line 27
This commit is contained in:
Ace 2019-02-12 08:46:52 +01:00 committed by GitHub
parent fff6361140
commit 72a5f13db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ def calibration():
red = Image.new('L', (EPD_WIDTH, EPD_HEIGHT), 'red')
ImageDraw.Draw(red)
print('calibrating red...')
epd.display_frame(epd.get_frame_buffer(red))
epd.display_frame(epd.get_frame_buffer(red))
white = Image.new('1', (EPD_WIDTH, EPD_HEIGHT), 'white')
ImageDraw.Draw(white)
print('calibrating white...')