another batch

This commit is contained in:
foamyguy 2023-11-03 17:53:01 -05:00
parent 6cbf7ecce4
commit e6296b12a7
29 changed files with 38 additions and 38 deletions

View file

@ -82,7 +82,7 @@ def blankScreen(disp, pix):
if disp is None:
return
disp.show(Group())
disp.root_group = Group()
class RPSDisplay():
@ -200,7 +200,7 @@ class RPSDisplay():
def showGroup(self, new_group):
self.disp_group = new_group
self.disp.show(new_group)
self.disp.root_group = new_group
def emptyGroup(self, dio_group):

View file

@ -223,7 +223,7 @@ setCursor(my_choice_idx, "your")
opp_cursor_dob.y = top_y_pos
screen_group.append(opp_cursor_dob)
display.show(screen_group)
display.root_group = screen_group
# From adafruit_ble.advertising
MANUFACTURING_DATA_ADT = 0xFF

View file

@ -56,7 +56,7 @@ group.append(press_label)
group.append(temp_data)
group.append(press_data)
display.show(group)
display.root_group = group
# function to convert celcius to fahrenheit
def c_to_f(temp):

View file

@ -78,7 +78,7 @@ def set_status(label, action_text, player):
display = tft_gizmo.TFT_Gizmo()
group = displayio.Group()
display.show(group)
display.root_group = group
while True:
if not radio.connected:

View file

@ -106,7 +106,7 @@ def wrap_in_tilegrid(filename:str):
display = tft_gizmo.TFT_Gizmo()
group = displayio.Group()
group.append(wrap_in_tilegrid("/ancs_connect.bmp"))
display.show(group)
display.root_group = group
current_notification = None
current_notifications = {}

View file

@ -320,7 +320,7 @@ def sensor_values():
clean_up(group)
group.scale = 1
display.show(group)
display.root_group = group
while True:
show_shapes()

View file

@ -14,7 +14,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
reg_label = label.Label(
font=terminalio.FONT,

View file

@ -15,7 +15,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
font = bitmap_font.load_font("fonts/Fayette-HandwrittenScript-48.bdf")

View file

@ -15,7 +15,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
# Font definition. You can choose any two fonts available in your system
@ -70,7 +70,7 @@ right_text_aligned = label.Label(
)
main_group.append(right_text_aligned)
display.show(main_group)
display.root_group = main_group
while True:
pass

View file

@ -14,7 +14,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
reg_label = label.Label(
font=terminalio.FONT,

View file

@ -15,7 +15,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
DISPLAY_WIDTH = 320
DISPLAY_HEIGHT = 240
TEXT = "Hello"
@ -75,7 +75,7 @@ text_group.append(text_area_bottom_middle)
text_group.append(text_area_bottom_left)
text_group.append(text_area_bottom_right)
display.show(text_group)
display.root_group = text_group
while True:
pass

View file

@ -16,7 +16,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
font = bitmap_font.load_font("fonts/LeagueSpartan-Bold-16.bdf")
# font = terminalio.FONT

View file

@ -14,7 +14,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
# font = bitmap_font.load_font("Fayette-HandwrittenScript-48.bdf")
font = terminalio.FONT

View file

@ -14,7 +14,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
# font = bitmap_font.load_font("Fayette-HandwrittenScript-48.bdf")
font = terminalio.FONT

View file

@ -15,7 +15,7 @@ display = board.DISPLAY
# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group
# create the label
updating_label = label.Label(

View file

@ -147,7 +147,7 @@ next_filename("gif")
# Blank the whole display
g = displayio.Group()
display.show(g)
display.root_group = g
display.auto_refresh = False
display.refresh()

View file

@ -81,7 +81,7 @@ def make_tilegrid():
x=0, y=-64,
default_tile=EMPTY)
group.append(grid)
display.show(group)
display.root_group = group
return grid

View file

@ -37,7 +37,7 @@ buttons = keypad.ShiftRegisterKeys(
)
# show the main group on the display
display.show(main_group)
display.root_group = main_group
# main loop
while True:

View file

@ -57,7 +57,7 @@ from micropython import const
def clear_display():
"""Display nothing"""
board.DISPLAY.show(displayio.Group())
board.DISPLAY.root_group = displayio.Group()
clear_display()
@ -293,7 +293,7 @@ speaker.play(mp3stream)
font = adafruit_bitmap_font.bitmap_font.load_font("rsrc/5x8.pcf")
playback_display = PlaybackDisplay()
board.DISPLAY.show(playback_display.group)
board.DISPLAY.root_group = playback_display.group
font.load_glyphs(range(32, 128))
joystick = analogjoy.AnalogJoystick()
@ -358,7 +358,7 @@ def menu_choice(seq, *, sel_idx=0, text_font=font):
last_scroll_idx = max(0, len(seq) - num_rows)
board.DISPLAY.show(scene)
board.DISPLAY.root_group = scene
buttons.events.clear()
i = 0
old_scroll_idx = None
@ -472,7 +472,7 @@ def play_all(playlist, *, folder='', trim=0, location='/sd'):
'folder' is a display name for the user."""
i = 0
board.DISPLAY.show(playback_display.group)
board.DISPLAY.root_group = playback_display.group
playback_display.iconbar.group.y = 112
while 0 <= i < len(playlist):
filename = playlist[i]
@ -520,7 +520,7 @@ def main():
error_text.y = board.DISPLAY.height // 2
g = displayio.Group()
g.append(error_text)
board.DISPLAY.show(g)
board.DISPLAY.root_group = g
while True:
time.sleep(1)

View file

@ -69,7 +69,7 @@ display.auto_refresh = False
font = bitmap_font.load_font("/digit-16px.pcf")
text_area = label.Label(font, text=" ", line_spacing=0.95)
text_area.y = 8
display.show(text_area)
display.root_group = text_area
N = float

View file

@ -62,7 +62,7 @@ display = adafruit_ili9341.ILI9341(display_bus, width=DISPLAY_WIDTH, height=DISP
# add base UI element
splash = displayio.Group(scale=SKETCH_SCALE)
display.show(splash)
display.root_group = splash
# add sketch
sketch_bitmap = displayio.Bitmap(SKETCH_WIDTH, SKETCH_HEIGHT, 2)

View file

@ -580,7 +580,7 @@ neko.y = display.height // 2 - neko.TILE_HEIGHT // 2
main_group.append(neko)
# show main_group on the display
display.show(main_group)
display.root_group = main_group
if USE_TOUCH_OVERLAY:
# initialize laser palette

View file

@ -73,4 +73,4 @@ while True:
watch_group.append(date)
watch_group.append(text)
oled.show(watch_group)
oled.root_group = watch_group

View file

@ -111,7 +111,7 @@ for idx in range(3):
wheel.y = -20
g.append(wheel)
wheels.append(wheel)
display.show(g)
display.root_group = g
# Make a unique order of the emoji on each wheel
orders = [shuffled(range(20)), shuffled(range(20)), shuffled(range(20))]

View file

@ -91,7 +91,7 @@ tg1 = displayio.TileGrid(b1, pixel_shader=palette)
tg2 = displayio.TileGrid(b2, pixel_shader=palette)
g1 = displayio.Group(scale=SCALE)
g1.append(tg1)
display.show(g1)
display.root_group = g1
g2 = displayio.Group(scale=SCALE)
g2.append(tg2)
@ -108,9 +108,9 @@ while True:
# values, 400 frames seems like a good number. Working in this way, with
# two bitmaps, reduces copying data and makes the animation a bit faster
for _ in range(n):
display.show(g1)
display.root_group = g1
apply_life_rule(b1, b2)
display.show(g2)
display.root_group = g2
apply_life_rule(b2, b1)
# After 2*n generations, fill the board with random values and

View file

@ -30,7 +30,7 @@ g.append(t)
l = Label(text="Feather\nRP2040", font=terminalio.FONT, color=0xffffff, line_spacing=.7)
g.append(l)
display.show(g)
display.root_group = g
target_fps = 50
ft = 1/target_fps

View file

@ -44,7 +44,7 @@ l1 = displayio.Group()
l2 = displayio.Group()
g.append(l1)
g.append(l2)
display.show(g)
display.root_group = g
l1.y = 1
l2.y = 16

View file

@ -60,7 +60,7 @@ line2.y = 24
g = displayio.Group()
g.append(line1)
g.append(line2)
display.show(g)
display.root_group = g
# This function will scoot one label a pixel to the left and send it back to
# the far right if it's gone all the way off screen. This goes in a function

View file

@ -66,7 +66,7 @@ TILEGRID = displayio.TileGrid(
GROUP = displayio.Group()
GROUP.append(TILEGRID)
DISPLAY.show(GROUP)
DISPLAY.root_group = GROUP
DISPLAY.refresh()
# Nothing interactive, just hold the image there