Skip to content

Commit 7cbb3e8

Browse files
authored
Merge pull request #34 from colonwq/add_sdcheck
Add sd_check function to pyportal
2 parents d14e53a + 212392b commit 7cbb3e8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

adafruit_pyportal.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,13 @@ def image_converter_url(image_url, width, height, color_depth=16):
719719
return IMAGE_CONVERTER_SERVICE % (aio_username, aio_key,
720720
width, height,
721721
color_depth, image_url)
722+
def sd_check(self):
723+
"""Returns True if there is an SD card preset and False
724+
if there is no SD card. The _sdcard value is set in _init
725+
"""
726+
if self._sdcard:
727+
return True
728+
return False
722729

723730
def push_to_io(self, feed_key, data):
724731
# pylint: disable=line-too-long

0 commit comments

Comments
 (0)