From 8c8b0f7d04f8292ff1d6c9b2cdea915b84a47627 Mon Sep 17 00:00:00 2001 From: James Carr Date: Mon, 19 Jul 2021 16:55:34 +0100 Subject: [PATCH 1/2] Remove unused imports Remove usage of max_size from displayio.Group Remove usage of max_glyphs from Label --- CircuitPython_RPN_Calculator/code.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/CircuitPython_RPN_Calculator/code.py b/CircuitPython_RPN_Calculator/code.py index 9931d9bbc..6a282ea04 100644 --- a/CircuitPython_RPN_Calculator/code.py +++ b/CircuitPython_RPN_Calculator/code.py @@ -6,16 +6,13 @@ from adafruit_display_text.label import Label from adafruit_hid.keyboard import Keyboard from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS -from adafruit_hid.keycode import Keycode from jepler_udecimal import Decimal, getcontext, localcontext -import jepler_udecimal.utrig import board import digitalio import displayio import framebufferio import microcontroller import sharpdisplay -import supervisor import terminalio try: @@ -199,15 +196,15 @@ def __init__(self): self.keyboard = None self.keyboard_layout = None - g = displayio.Group(max_size=7) + g = displayio.Group() self.labels = labels = [] - labels.append(Label(terminalio.FONT, max_glyphs=32, scale=2, color=0)) - labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0)) - labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0)) - labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0)) - labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0)) - labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0)) + labels.append(Label(terminalio.FONT, scale=2, color=0)) + labels.append(Label(terminalio.FONT, scale=3, color=0)) + labels.append(Label(terminalio.FONT, scale=3, color=0)) + labels.append(Label(terminalio.FONT, scale=3, color=0)) + labels.append(Label(terminalio.FONT, scale=3, color=0)) + labels.append(Label(terminalio.FONT, scale=3, color=0)) for li in labels: g.append(li) From fc14a015e76a39c18f63b6bce06a0d4381894778 Mon Sep 17 00:00:00 2001 From: James Carr Date: Mon, 19 Jul 2021 23:35:03 +0100 Subject: [PATCH 2/2] Re-add import for jepler_udecimal.utrig --- CircuitPython_RPN_Calculator/code.py | 1 + 1 file changed, 1 insertion(+) diff --git a/CircuitPython_RPN_Calculator/code.py b/CircuitPython_RPN_Calculator/code.py index 6a282ea04..7f5de552f 100644 --- a/CircuitPython_RPN_Calculator/code.py +++ b/CircuitPython_RPN_Calculator/code.py @@ -7,6 +7,7 @@ from adafruit_hid.keyboard import Keyboard from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS from jepler_udecimal import Decimal, getcontext, localcontext +import jepler_udecimal.utrig # Needed for trig functions in Decimal import board import digitalio import displayio