Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Sensors for clue #289

Merged
merged 59 commits into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4fa9340
Connect first sensor for temperature
xnkevinnguyen Mar 31, 2020
4c32700
Separate accelerometer from gestures
xnkevinnguyen Apr 1, 2020
a4fbab1
Place holder for each clue sensors
xnkevinnguyen Apr 1, 2020
662e3ed
Refactor accelerometer component
xnkevinnguyen Apr 1, 2020
f228a16
Update type for generic slider toolbar
xnkevinnguyen Apr 1, 2020
7eb30b6
Add light sensor clue
xnkevinnguyen Apr 1, 2020
fab9d9d
first commit
vandyliu Apr 1, 2020
03ba91c
formatted
vandyliu Apr 1, 2020
4d73573
changed how dicts are updated in __state
vandyliu Apr 1, 2020
7c295bd
fixed bugs in clue test
vandyliu Apr 1, 2020
a10f3eb
Add sliders for pressure and proximity
xnkevinnguyen Apr 1, 2020
7441dc5
Merge branch 'dev' into users/t-xunguy/clue-sensors
xnkevinnguyen Apr 1, 2020
f744acf
fixed bug in tests
vandyliu Apr 1, 2020
46802b2
Merge branch 'users/t-vali/clue-python-sensors' into users/t-xunguy/c…
vandyliu Apr 1, 2020
89a3e18
Add fields to en.json
xnkevinnguyen Apr 1, 2020
f0cdf30
added python side
vandyliu Apr 1, 2020
c419f1f
Merge branch 'users/t-xunguy/clue-sensors' of https://github.com/micr…
vandyliu Apr 1, 2020
9f9169e
Update sensors with gesture
xnkevinnguyen Apr 1, 2020
ec6220a
Merge branch 'users/t-xunguy/clue-sensors' of https://github.com/micr…
xnkevinnguyen Apr 1, 2020
385cc26
Merge branch 'dev' into users/t-xunguy/clue-sensors
vandyliu Apr 2, 2020
7078b9e
Map out strings for modals
xnkevinnguyen Apr 2, 2020
f205406
Add the svgs
xnkevinnguyen Apr 2, 2020
bd9da73
Merge branch 'dev' into users/t-xunguy/clue-sensors
vandyliu Apr 2, 2020
9aff606
fixed up python backend to match frontend sensors
vandyliu Apr 2, 2020
a08b688
changed state keys to constants
vandyliu Apr 2, 2020
b844f38
Add correct text for sensors
xnkevinnguyen Apr 2, 2020
1fb3349
Update gesture for microbit
xnkevinnguyen Apr 3, 2020
83aa71f
Merge branch 'users/t-xunguy/clue-sensors' of https://github.com/micr…
xnkevinnguyen Apr 3, 2020
30c3e5f
Update tests for ui change
xnkevinnguyen Apr 3, 2020
bcc1717
Remove unused imports
xnkevinnguyen Apr 3, 2020
db67d0d
Change wording
xnkevinnguyen Apr 3, 2020
bedd197
Change range values
xnkevinnguyen Apr 3, 2020
fe0eb3d
Add shake gesture
xnkevinnguyen Apr 3, 2020
fa9154d
added shake
vandyliu Apr 3, 2020
990939c
Merge remote-tracking branch 'origin/dev' into users/t-xunguy/clue-se…
xnkevinnguyen Apr 3, 2020
1cf7af3
Merge branch 'dev' into users/t-xunguy/clue-sensors
xnkevinnguyen Apr 3, 2020
64e5d45
Name change for generic slider content
xnkevinnguyen Apr 3, 2020
09b979d
Merge branch 'users/t-xunguy/clue-sensors' of https://github.com/micr…
xnkevinnguyen Apr 3, 2020
84afb1b
Modify css to fix wrong colors on modals
xnkevinnguyen Apr 5, 2020
1e41705
Add svg for gyro and magnet
xnkevinnguyen Apr 6, 2020
75a7607
Add modal for compass, gyro and magnet
xnkevinnguyen Apr 6, 2020
83d8537
Add proper text strings for 3 sensors
xnkevinnguyen Apr 6, 2020
f7f138e
Set min width to toolbar for less resizing
xnkevinnguyen Apr 6, 2020
a3e18d4
Update tests with latest css changes
xnkevinnguyen Apr 6, 2020
8590fc5
addressed pr comments and added gyro and magnetic sensors to backend
vandyliu Apr 6, 2020
d046c21
Fixed bug in color test
vandyliu Apr 6, 2020
03b7216
fixed bug in update_button
vandyliu Apr 6, 2020
86bced3
formatted
vandyliu Apr 6, 2020
32c3b4c
Update src/view/translations/en.json
xnkevinnguyen Apr 6, 2020
1558c3d
Update src/view/translations/en.json
xnkevinnguyen Apr 6, 2020
4662fba
Update src/view/translations/en.json
xnkevinnguyen Apr 6, 2020
835c219
Update src/view/translations/en.json
xnkevinnguyen Apr 6, 2020
194fdba
Update src/view/translations/en.json
xnkevinnguyen Apr 6, 2020
1f37fa9
Update src/view/translations/en.json
xnkevinnguyen Apr 6, 2020
f4cf0c1
Update src/view/translations/en.json
xnkevinnguyen Apr 6, 2020
ff9cc72
Update src/view/translations/en.json
xnkevinnguyen Apr 6, 2020
4e0988e
Merge branch 'dev' into users/t-xunguy/clue-sensors
xnkevinnguyen Apr 6, 2020
cfad2e7
address pr comments
vandyliu Apr 6, 2020
5e1ccd6
added constants to altitude formula
vandyliu Apr 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 79 additions & 23 deletions src/base_circuitpython/base_cp_constants.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,79 @@
CPX = "CPX"
CLUE = "CLUE"
PIXELS = "pixels"

CLUE_PIN = "D18"

CLUE = "CLUE"
BASE_64 = "display_base64"
IMG_DIR_NAME = "img"
SCREEN_HEIGHT_WIDTH = 240

BLINKA_BMP = "blinka.bmp"
CLUE_TERMINAL_LINE_HEIGHT = 16
CLUE_TERMINAL_LINE_NUM_MAX = 15
CLUE_TERMINAL_X_OFFSET = 15
CLUE_TERMINAL_Y_OFFSET = 5
CLUE_TERMINAL_LINE_BREAK_AMT = 37
BMP_IMG = "BMP"

BMP_IMG_ENDING = ".bmp"

NO_VALID_IMGS_ERR = "No valid images"
EXPECTED_INPUT_BUTTONS = ["button_a", "button_b"]
class CLUE_STATE:
BUTTON_A = "button_a"
BUTTON_B = "button_b"
PRESSED_BUTTONS = "pressed_buttons"
SEA_LEVEL_PRESSURE = "sea_level_pressure"
TEMPERATURE = "temperature"
PROXIMITY = "proximity"
GESTURE = "gesture"
HUMIDITY = "humidity"
PRESSURE = "pressure"
PIXEL = "pixel"
# Accelerometer
MOTION_X = "motion_x"
MOTION_Y = "motion_y"
MOTION_Z = "motion_z"
# Light/color sensor
LIGHT_R = "light_r"
LIGHT_G = "light_g"
LIGHT_B = "light_b"
LIGHT_C = "light_c"
# Magnetometer
MAGNET_X = "magnet_x"
MAGNET_Y = "magnet_y"
MAGNET_Z = "magnet_z"
# Gyroscope
GYRO_X = "gyro_x"
GYRO_Y = "gyro_y"
GYRO_Z = "gyro_z"


CPX = "CPX"
CLUE = "CLUE"
PIXELS = "pixels"
SHAKE = "shake"

CLUE_PIN = "D18"

CLUE = "CLUE"
BASE_64 = "display_base64"
IMG_DIR_NAME = "img"
SCREEN_HEIGHT_WIDTH = 240

EXPECTED_INPUT_BUTTONS = set([CLUE_STATE.BUTTON_A, CLUE_STATE.BUTTON_B])

ALL_EXPECTED_INPUT_EVENTS = set(
[
CLUE_STATE.TEMPERATURE,
CLUE_STATE.LIGHT_R,
CLUE_STATE.LIGHT_G,
CLUE_STATE.LIGHT_B,
CLUE_STATE.LIGHT_C,
CLUE_STATE.MOTION_X,
CLUE_STATE.MOTION_Y,
CLUE_STATE.MOTION_Z,
CLUE_STATE.HUMIDITY,
CLUE_STATE.PRESSURE,
CLUE_STATE.PROXIMITY,
CLUE_STATE.GESTURE,
CLUE_STATE.GYRO_X,
CLUE_STATE.GYRO_Y,
CLUE_STATE.GYRO_Z,
CLUE_STATE.MAGNET_X,
CLUE_STATE.MAGNET_Y,
CLUE_STATE.MAGNET_Z,
]
)

BMP_IMG = "BMP"

BMP_IMG_ENDING = ".bmp"

NO_VALID_IMGS_ERR = "No valid images"

BLINKA_BMP = "blinka.bmp"
CLUE_TERMINAL_LINE_HEIGHT = 16
CLUE_TERMINAL_LINE_NUM_MAX = 15
CLUE_TERMINAL_X_OFFSET = 15
CLUE_TERMINAL_Y_OFFSET = 5
CLUE_TERMINAL_LINE_BREAK_AMT = 37
Loading