Skip to content

Commit 2562c2c

Browse files
authored
Merge pull request adafruit#1618 from lesamouraipourpre/rpn-calculator
RPN Calculator: Update for CP7
2 parents 3e3d1de + fc14a01 commit 2562c2c

File tree

1 file changed

+8
-10
lines changed
  • CircuitPython_RPN_Calculator

1 file changed

+8
-10
lines changed

CircuitPython_RPN_Calculator/code.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
from adafruit_display_text.label import Label
77
from adafruit_hid.keyboard import Keyboard
88
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
9-
from adafruit_hid.keycode import Keycode
109
from jepler_udecimal import Decimal, getcontext, localcontext
11-
import jepler_udecimal.utrig
10+
import jepler_udecimal.utrig # Needed for trig functions in Decimal
1211
import board
1312
import digitalio
1413
import displayio
1514
import framebufferio
1615
import microcontroller
1716
import sharpdisplay
18-
import supervisor
1917
import terminalio
2018

2119
try:
@@ -199,15 +197,15 @@ def __init__(self):
199197
self.keyboard = None
200198
self.keyboard_layout = None
201199

202-
g = displayio.Group(max_size=7)
200+
g = displayio.Group()
203201

204202
self.labels = labels = []
205-
labels.append(Label(terminalio.FONT, max_glyphs=32, scale=2, color=0))
206-
labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0))
207-
labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0))
208-
labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0))
209-
labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0))
210-
labels.append(Label(terminalio.FONT, max_glyphs=32, scale=3, color=0))
203+
labels.append(Label(terminalio.FONT, scale=2, color=0))
204+
labels.append(Label(terminalio.FONT, scale=3, color=0))
205+
labels.append(Label(terminalio.FONT, scale=3, color=0))
206+
labels.append(Label(terminalio.FONT, scale=3, color=0))
207+
labels.append(Label(terminalio.FONT, scale=3, color=0))
208+
labels.append(Label(terminalio.FONT, scale=3, color=0))
211209

212210
for li in labels:
213211
g.append(li)

0 commit comments

Comments
 (0)