Skip to content

fix broken version and some fixes #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions adafruit_pyportal.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import gc
import board
import busio
import microcontroller
from digitalio import DigitalInOut
import pulseio
import adafruit_touchscreen
Expand Down Expand Up @@ -182,7 +181,7 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,

if self._debug:
print("Init display")
self.splash = displayio.Group(max_size=5)
self.splash = displayio.Group(max_size=15)

if self._debug:
print("Init background")
Expand Down Expand Up @@ -225,7 +224,7 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
esp32_cs = DigitalInOut(board.ESP_CS)
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)

if not self._uselocal:
if url and not self._uselocal:
self._esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready,
esp32_reset, esp32_gpio0)
#self._esp._debug = 1
Expand All @@ -245,6 +244,7 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,

# set the default background
self.set_background(self._default_bg)
board.DISPLAY.show(self.splash)

if self._debug:
print("Init SD Card")
Expand All @@ -257,7 +257,6 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
except OSError as error:
print("No SD card found:", error)


self._qr_group = None

if self._debug:
Expand Down Expand Up @@ -323,10 +322,8 @@ def __init__(self, *, url=None, json_path=None, regexp_path=None,
if self._debug:
print("Init touchscreen")
# pylint: disable=no-member
self.touchscreen = adafruit_touchscreen.Touchscreen(microcontroller.pin.PB01,
microcontroller.pin.PB08,
microcontroller.pin.PA06,
microcontroller.pin.PB00,
self.touchscreen = adafruit_touchscreen.Touchscreen(board.TOUCH_XL, board.TOUCH_XR,
board.TOUCH_YD, board.TOUCH_YU,
calibration=((5200, 59000),
(5800, 57000)),
size=(320, 240))
Expand Down