Merge pull request #95 from RetiredWizard/main

Remove depreciated .show from library
This commit is contained in:
Dan Halbert 2023-11-01 22:25:45 -04:00 committed by GitHub
commit b00cf59abf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -56,7 +56,7 @@ class GraphicsBase:
# set the default background # set the default background
if default_bg is not None: if default_bg is not None:
self.display.show(self.splash) self.display.root_group = self.splash
self.set_background(default_bg) self.set_background(default_bg)
gc.collect() gc.collect()

View file

@ -11,6 +11,7 @@ See MatrixPortal, MagTag, and PyPortal libraries for more examples.
import board import board
import displayio
from adafruit_pyportal import PyPortal from adafruit_pyportal import PyPortal
# Set a data source URL # Set a data source URL
@ -20,7 +21,7 @@ TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
pyportal = PyPortal(url=TEXT_URL, status_neopixel=board.NEOPIXEL) pyportal = PyPortal(url=TEXT_URL, status_neopixel=board.NEOPIXEL)
# Set display to show REPL # Set display to show REPL
board.DISPLAY.show(None) board.DISPLAY.root_group = displayio.CIRCUITPYTHON_TERMINAL
# Go get that data # Go get that data
print("Fetching text from", TEXT_URL) print("Fetching text from", TEXT_URL)