Skip to content

Commit 02d99a3

Browse files
authored
Fixing Bug Bash Issues (microsoft#307)
Fixed issues from bug bash
1 parent 87897bd commit 02d99a3

4 files changed

Lines changed: 15 additions & 12 deletions

File tree

src/base_circuitpython/board.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import terminal_handler
66

77

8-
class Display:
8+
class __Display:
99
def __init__(self):
1010
self.active_group = None
1111
self.terminal = terminal_handler.Terminal()
@@ -25,7 +25,7 @@ def show(self, group=None):
2525
group._Group__draw()
2626

2727

28-
DISPLAY = Display()
28+
DISPLAY = __Display()
2929

3030
# default pin for neopixel,
3131
# shows that this could

src/base_circuitpython/displayio/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,5 +336,5 @@ def __len__(self):
336336
def pop(self, i=-1):
337337
item = self.__contents.pop(i)
338338
item.parent = None
339-
self.elem_changed()
339+
self.__elem_changed()
340340
return item

src/clue/adafruit_slideshow.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
import time
88
import collections
99
from random import shuffle
10-
from common import utils
11-
from common import debugger_communication_client
12-
from common.telemetry import telemetry_py
13-
from common.telemetry_events import TelemetryEvent
10+
import common
1411
import board
1512

1613
# taken from adafruit
@@ -157,7 +154,7 @@ def __init__(
157154
# if path is relative, this makes sure that
158155
# it's relative to the users's code file
159156
abs_path_parent_dir = os.path.abspath(
160-
os.path.join(utils.abs_path_to_user_file, os.pardir)
157+
os.path.join(common.utils.abs_path_to_user_file, os.pardir)
161158
)
162159
abs_path_folder = os.path.normpath(os.path.join(abs_path_parent_dir, folder))
163160

@@ -176,7 +173,9 @@ def __init__(
176173
# show the first working image
177174
self.advance()
178175

179-
telemetry_py.send_telemetry(TelemetryEvent.CLUE_API_SLIDESHOW)
176+
common.telemetry.telemetry_py.send_telemetry(
177+
common.telemetry.TelemetryEvent.CLUE_API_SLIDESHOW
178+
)
180179

181180
@property
182181
def current_image_name(self):
@@ -382,9 +381,9 @@ def __send(self, img):
382381

383382
sendable_json = {CONSTANTS.BASE_64: img_str}
384383

385-
if utils.debug_mode:
386-
debugger_communication_client.debug_send_to_simulator(
384+
if common.utils.debug_mode:
385+
common.debugger_communication_client.debug_send_to_simulator(
387386
sendable_json, CONSTANTS.CLUE
388387
)
389388
else:
390-
utils.send_to_simulator(sendable_json, CONSTANTS.CLUE)
389+
common.utils.send_to_simulator(sendable_json, CONSTANTS.CLUE)

src/common/debugger_communication_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33

44
import sys
55
import json
6+
7+
# WARNING: importing socketio will sometimes cause errors in normal execution
8+
# try to import common instead of common.debugger_communication_cleint
69
import socketio
10+
711
import copy
812
import pathlib
913

0 commit comments

Comments
 (0)