We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c295bd commit f744acfCopy full SHA for f744acf
2 files changed
src/clue/adafruit_clue.py
@@ -203,7 +203,7 @@ def __init__(self):
203
"button_a": False,
204
"button_b": False,
205
"pressed_buttons": set(),
206
- "accelerometer": {"x": 0, "y": 0, "z": 0},
+ "acceleration": {"x": 0, "y": 0, "z": 0},
207
"color_sensor": {"r": 0, "g": 0, "b": 0, "c": 0},
208
"magnetometer": {"x": 0, "y": 0, "z": 0},
209
"gyro": {"x": 0, "y": 0, "z": 0},
@@ -268,9 +268,9 @@ def acceleration(self):
268
print("Accel: {:.2f} {:.2f} {:.2f}".format(*clue.acceleration))
269
"""
270
return (
271
- self.__state["accelerometer"]["x"],
272
- self.__state["accelerometer"]["y"],
273
- self.__state["accelerometer"]["z"],
+ self.__state["acceleration"]["x"],
+ self.__state["acceleration"]["y"],
+ self.__state["acceleration"]["z"],
274
)
275
276
@property
src/clue/test/test_adafruit_clue.py
@@ -100,7 +100,7 @@ def test_color(self):
100
}
101
102
assert clue.color == (MOCK_COLOR_R_A, MOCK_COLOR_G, MOCK_COLOR_B, MOCK_COLOR_C)
103
- assert clue._Clue__state["color_sensor"]["r"] == MOCK_COLOR_R_B
+ clue._Clue__state["color_sensor"]["r"] = MOCK_COLOR_R_B
104
assert clue.color == (MOCK_COLOR_R_B, MOCK_COLOR_G, MOCK_COLOR_B, MOCK_COLOR_C)
105
106
def test_temperature(self):
0 commit comments