last batch in this pass
This commit is contained in:
parent
d76cd68e00
commit
f770ad0e30
27 changed files with 31 additions and 31 deletions
|
|
@ -102,7 +102,7 @@ main_group = displayio.Group()
|
|||
for x in display_objects:
|
||||
main_group.append(x)
|
||||
|
||||
display.show(main_group)
|
||||
display.root_group = main_group
|
||||
|
||||
# convert UTC time to local timezone
|
||||
def utc_to_local(utc_dt):
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ group.append(temp_text)
|
|||
group.append(humid_text)
|
||||
group.append(press_text)
|
||||
group.append(time_text)
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
# clock to count down to sending data to Azure
|
||||
azure_clock = 500
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ for line in blm_font:
|
|||
g.append(line)
|
||||
for line in names_font:
|
||||
g.append(line)
|
||||
display.show(g)
|
||||
display.root_group = g
|
||||
|
||||
|
||||
while True:
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ framebuffer = sharpdisplay.SharpMemoryFramebuffer(bus, chip_select_pin, 400, 240
|
|||
display = framebufferio.FramebufferDisplay(framebuffer)
|
||||
|
||||
splash = displayio.Group()
|
||||
display.show(splash)
|
||||
display.root_group = splash
|
||||
|
||||
|
||||
# Set up PWM LEDs
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ group = displayio.Group()
|
|||
group.append(heart)
|
||||
group.append(line1)
|
||||
group.append(line2)
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
def update_heart(message, heart_color):
|
||||
# turn off auto refresh while we change some things
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ group = displayio.Group()
|
|||
group.append(heart)
|
||||
group.append(line1)
|
||||
group.append(line2)
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
while True:
|
||||
# turn off auto refresh while we change some things
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ group = displayio.Group()
|
|||
group.append(heart)
|
||||
group.append(line1)
|
||||
group.append(line2)
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
def update_heart(message, heart_color):
|
||||
# turn off auto refresh while we change some things
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ group = displayio.Group()
|
|||
group.append(heart)
|
||||
group.append(line1)
|
||||
group.append(line2)
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
while True:
|
||||
# turn off auto refresh while we change some things
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ melody_tempo = 0.02
|
|||
# setup TFT Gizmo and main display group (splash)
|
||||
display = tft_gizmo.TFT_Gizmo()
|
||||
splash = displayio.Group()
|
||||
display.show(splash)
|
||||
display.root_group = splash
|
||||
|
||||
# load dreidel background image
|
||||
dreidel_bmp, dreidel_pal = adafruit_imageload.load("/dreidel_background.bmp",
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ splash = displayio.Group()
|
|||
splash.append(background)
|
||||
splash.append(flakes)
|
||||
splash.append(snow)
|
||||
display.show(splash)
|
||||
display.root_group = splash
|
||||
|
||||
def clear_the_snow():
|
||||
#pylint: disable=global-statement, redefined-outer-name
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ splash = displayio.Group()
|
|||
splash.append(background)
|
||||
splash.append(flakes)
|
||||
splash.append(snow)
|
||||
display.show(splash)
|
||||
display.root_group = splash
|
||||
|
||||
def clear_the_snow():
|
||||
#pylint: disable=global-statement, redefined-outer-name
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ sprite.x = 16 * player_loc["x"]
|
|||
sprite.y = 16 * player_loc["y"]
|
||||
|
||||
# Add the Group to the Display
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
prev_btn_vals = ugame.buttons.get_pressed()
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ sprite.x = 16 * player_loc["x"]
|
|||
sprite.y = 16 * player_loc["y"]
|
||||
|
||||
# Add the Group to the Display
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
prev_btn_vals = ugame.buttons.get_pressed()
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,6 @@ sprite.x = 16 * 4
|
|||
sprite.y = 16 * 3
|
||||
|
||||
# Add the Group to the Display
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
while True:
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ print("loading map")
|
|||
load_map(MAPS[GAME_STATE["MAP_INDEX"]])
|
||||
|
||||
# Add the Group to the Display
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
# variables to store previous value of button state
|
||||
prev_up = False
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ def scroll(line):
|
|||
g = displayio.Group()
|
||||
g.append(line1)
|
||||
|
||||
display.show(g)
|
||||
display.root_group = g
|
||||
|
||||
wavs = []
|
||||
for filename in os.listdir('/tomb_sounds'):
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ timer_label.y = 114
|
|||
text_group.append(timer_label)
|
||||
|
||||
clue_display.append(text_group)
|
||||
clue.display.show(clue_display)
|
||||
clue.display.root_group = clue_display
|
||||
|
||||
# Define color Palettes
|
||||
waterPalette = [0x00d9ff, 0x006f82, 0x43bfb9, 0x0066ff]
|
||||
|
|
@ -231,7 +231,7 @@ while True:
|
|||
reading2_label.text = "Last {:.1f}".format(reading2)
|
||||
reading3_label.text = "Prev {:.1f}".format(reading3)
|
||||
timer_label.text = "{}".format(counter)
|
||||
clue.display.show(clue_display)
|
||||
clue.display.root_group = clue_display
|
||||
|
||||
# Is it time to update?
|
||||
if counter > timeToCheck:
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ display = ST7789(
|
|||
)
|
||||
|
||||
splash = displayio.Group()
|
||||
display.show(splash)
|
||||
display.root_group = splash
|
||||
|
||||
for output_line in shell_command(listen_command):
|
||||
process_output(output_line)
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ orange_dark = 0x472a16
|
|||
|
||||
# display
|
||||
main_display_group = displayio.Group() # everything goes in main group
|
||||
display.show(main_display_group) # show main group (clears screen, too)
|
||||
display.root_group = main_display_group # show main group (clears screen, too)
|
||||
|
||||
# background bitmap w OnDiskBitmap
|
||||
tape_bitmap = displayio.OnDiskBitmap(open("mp3_tape.bmp", "rb"))
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class OpenWeather_Graphics(displayio.Group):
|
|||
# bg_sprite = displayio.TileGrid(background, pixel_shader=background.pixel_shader)
|
||||
|
||||
splash.append(bg_sprite)
|
||||
display.show(splash)
|
||||
display.root_group = splash
|
||||
|
||||
self.root_group = displayio.Group()
|
||||
self.root_group.append(self)
|
||||
|
|
@ -155,7 +155,7 @@ class OpenWeather_Graphics(displayio.Group):
|
|||
else:
|
||||
self.wind_text.text = "%d mph" % wind
|
||||
|
||||
self.display.show(self.root_group)
|
||||
self.display.root_group = self.root_group
|
||||
|
||||
def set_icon(self, icon_name):
|
||||
"""Use icon_name to get the position of the sprite and update
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ SPRITES.append(Sprite(EYE_DATA["eye_image"])) # Base image is opaque
|
|||
SPRITES.append(Sprite(EYE_DATA["lower_lid_image"], EYE_DATA["transparent"]))
|
||||
SPRITES.append(Sprite(EYE_DATA["upper_lid_image"], EYE_DATA["transparent"]))
|
||||
SPRITES.append(Sprite(EYE_DATA["stencil_image"], EYE_DATA["transparent"]))
|
||||
DISPLAY.show(SPRITES)
|
||||
DISPLAY.root_group = SPRITES
|
||||
|
||||
EYE_CENTER = (
|
||||
(EYE_DATA["eye_move_min"][0] + EYE_DATA["eye_move_max"][0]) # Pixel coords of eye
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ with open("quotes.csv", "r", encoding="UTF-8") as F:
|
|||
|
||||
display = board.DISPLAY
|
||||
splash = displayio.Group()
|
||||
display.show(splash)
|
||||
display.root_group = splash
|
||||
|
||||
arial = bitmap_font.load_font("fonts/Arial-12.pcf")
|
||||
bold = bitmap_font.load_font("fonts/Arial-Bold-12.pcf")
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ pyportal.set_backlight(0.5)
|
|||
splash = displayio.Group()
|
||||
|
||||
# show splash group
|
||||
display.show(splash)
|
||||
display.root_group = splash
|
||||
|
||||
# Palette for water bitmap
|
||||
palette = displayio.Palette(2)
|
||||
|
|
|
|||
|
|
@ -23,13 +23,13 @@ class WeatherStation_GFX(displayio.Group):
|
|||
def __init__(self, celsius=True):
|
||||
# root displayio group
|
||||
root_group = displayio.Group()
|
||||
board.DISPLAY.show(root_group)
|
||||
board.DISPLAY.root_group = root_group
|
||||
super().__init__()
|
||||
self._celsius = celsius
|
||||
|
||||
# create background icon group
|
||||
self._icon_group = displayio.Group()
|
||||
board.DISPLAY.show(self._icon_group)
|
||||
board.DISPLAY.root_group = self._icon_group
|
||||
|
||||
# create text object group
|
||||
self._text_group = displayio.Group()
|
||||
|
|
@ -75,7 +75,7 @@ class WeatherStation_GFX(displayio.Group):
|
|||
self.sgp_text.x = 0
|
||||
self.sgp_text.y = 155
|
||||
|
||||
board.DISPLAY.show(self._text_group)
|
||||
board.DISPLAY.root_group = self._text_group
|
||||
|
||||
def display_io_status(self, status_text):
|
||||
"""Displays the current IO status.
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from ulab import numpy as np
|
|||
|
||||
# Blank the screen. Scrolling text causes unwanted delays.
|
||||
d = displayio.Group()
|
||||
board.DISPLAY.show(d)
|
||||
board.DISPLAY.root_group = d
|
||||
|
||||
# Sampling rate: 16Hz
|
||||
# Cutoff frequency: 0.16Hz
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from ulab import numpy as np
|
|||
# Blank the screen. Scrolling text causes unwanted delays.
|
||||
import displayio
|
||||
d = displayio.Group()
|
||||
board.DISPLAY.show(d)
|
||||
board.DISPLAY.root_group = d
|
||||
|
||||
# Filter computed at https://fiiir.com/
|
||||
# Sampling rate: 8Hz
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ fft_size = 256
|
|||
group.append(graph)
|
||||
|
||||
# Add the Group to the Display
|
||||
display.show(group)
|
||||
display.root_group = group
|
||||
|
||||
# instantiate board mic
|
||||
mic = audiobusio.PDMIn(board.MICROPHONE_CLOCK, board.MICROPHONE_DATA,
|
||||
|
|
|
|||
Loading…
Reference in a new issue