Skip to content

Commit a4c05ef

Browse files
authored
Merge pull request #1607 from lesamouraipourpre/baudot-tty
Baudot_TTY: Remove max_size usage from displayio.Group
2 parents 420d922 + 569cb8f commit a4c05ef

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Baudot_TTY/baudot_tty_GUI.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
clue.display.brightness = 1.0
29-
screen = displayio.Group(max_size=5)
29+
screen = displayio.Group()
3030

3131
VFD_GREEN = 0x00FFD2
3232
VFD_BG = 0x000505
@@ -65,11 +65,13 @@
6565

6666
messages_labels = {} # dictionary of configured messages_labels
6767

68-
message_group = displayio.Group(max_size=5, scale=1)
68+
message_group = displayio.Group(scale=1)
6969

7070
for message_config in messages_config:
7171
(name, textline, color, x, y) = message_config # unpack tuple into five var names
72-
message_label = label.Label(terminalio.FONT, text=textline, color=color, max_glyphs=50)
72+
message_label = label.Label(
73+
terminalio.FONT, text=textline, color=color, max_glyphs=50
74+
)
7375
message_label.x = x
7476
message_label.y = y
7577
messages_labels[name] = message_label

Baudot_TTY/baudot_tty_ble.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
ble = BLERadio()
2020
uart_server = UARTService()
2121
advertisement = ProvideServicesAdvertisement(uart_server)
22-
ble._adapter.name = "TTY_MACHINE" # pylint: disable=protected-access
22+
ble._adapter.name = "TTY_MACHINE" # pylint: disable=protected-access
2323

2424
# constants for sine wave generation
2525
SIN_LENGTH = 100 # more is less choppy
@@ -148,7 +148,8 @@ def baudot_bit(pitch=bit_1, duration=0.022): # spec says 20ms, but adjusted as
148148
# dac.stop()
149149

150150

151-
def baudot_carrier(duration=0.15): # Carrier is transmitted 150 ms before first character is sent
151+
def baudot_carrier(duration=0.15):
152+
# Carrier is transmitted 150 ms before first character is sent
152153
baudot_bit(carrier, duration)
153154
dac.stop()
154155

0 commit comments

Comments
 (0)