Skip to content

Commit

Permalink
UC8159: Check EEPROM is not None
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Dec 20, 2021
1 parent 9fdec79 commit 7211b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/inky/inky_uc8159.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def __init__(self, resolution=(600, 448), colour='multi', cs_pin=CS0_PIN, dc_pin

# Check for supported display variant and select the correct resolution
# Eg: 600x480 and 640x400
if self.eeprom.display_variant in (14, 15):
if self.eeprom is not None and self.eeprom.display_variant in (14, 15):
eeprom_resolution = _RESOLUTION.keys[self.eeprom.display_variant - 14]
self.resolution = eeprom_resolution
self.width, self.height = eeprom_resolution
Expand Down

0 comments on commit 7211b54

Please sign in to comment.