From bb8a4062dfec0b5bf65c09dc741d27d72ac982f4 Mon Sep 17 00:00:00 2001 From: James Carr Date: Sun, 4 Jul 2021 13:04:43 +0100 Subject: [PATCH 1/2] Update requirements for st7789 - Closes #16 --- requirements.txt | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f675e3b..90851f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ Adafruit-Blinka adafruit-circuitpython-busdevice +adafruit-circuitpython-st7789 diff --git a/setup.py b/setup.py index 0957c53..8d87502 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ install_requires=[ "Adafruit-Blinka", "adafruit-circuitpython-busdevice", - "adafruit_st7789", + "adafruit-circuitpython-st7789", ], # Choose your license license="MIT", From a85a1c740d3da43ca77e9224e6de48725032950d Mon Sep 17 00:00:00 2001 From: James Carr Date: Sun, 4 Jul 2021 13:06:56 +0100 Subject: [PATCH 2/2] Remove max_size parameter --- examples/gizmo_tft_demo.py | 4 ++-- examples/gizmo_tft_thermometer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/gizmo_tft_demo.py b/examples/gizmo_tft_demo.py index 611b1df..b0daca9 100644 --- a/examples/gizmo_tft_demo.py +++ b/examples/gizmo_tft_demo.py @@ -14,7 +14,7 @@ display = tft_gizmo.TFT_Gizmo() # Make the display context -splash = displayio.Group(max_size=10) +splash = displayio.Group() display.show(splash) color_bitmap = displayio.Bitmap(240, 240, 1) @@ -32,7 +32,7 @@ splash.append(inner_sprite) # Draw a label -text_group = displayio.Group(max_size=10, scale=2, x=50, y=120) +text_group = displayio.Group(scale=2, x=50, y=120) text = "Hello World!" text_area = label.Label(terminalio.FONT, text=text, color=0xFFFF00) text_group.append(text_area) # Subgroup for text scaling diff --git a/examples/gizmo_tft_thermometer.py b/examples/gizmo_tft_thermometer.py index ac8e0a4..7cc4fb5 100644 --- a/examples/gizmo_tft_thermometer.py +++ b/examples/gizmo_tft_thermometer.py @@ -56,7 +56,7 @@ def c_to_f(c_val): text = "%.2f C" % (round(cp.temperature, 2)) # Create a Group for the text so we can scale it - text_group = displayio.Group(max_size=1, scale=TEXT_SCALE, x=0, y=0) + text_group = displayio.Group(scale=TEXT_SCALE, x=0, y=0) # Create a Label to show the initial temperature value text_area = label.Label(terminalio.FONT, text=text, color=0xFFFFFF)