Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
371 commits
Select commit Hold shift + click to select a range
e5593dc
Linting ts
xnkevinnguyen Feb 6, 2020
6ed027d
formatted python black
andreamah Feb 6, 2020
c96a4e3
Update UI test for selector
xnkevinnguyen Feb 6, 2020
55b7250
Remove unecessary spread operations of the state for microbit
xnkevinnguyen Feb 6, 2020
05f9bca
abstracted debugger away
andreamah Feb 6, 2020
ca1ed69
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
andreamah Feb 6, 2020
086250c
Display module for microbit library (#189)
vandyliu Feb 6, 2020
35a945a
merged in display
andreamah Feb 6, 2020
eeb025d
fixed deadlock issues
andreamah Feb 6, 2020
7363419
reformat w black
andreamah Feb 6, 2020
50db730
fixed utils test
andreamah Feb 6, 2020
78066e8
Logic for set state only in extension.tsx
xnkevinnguyen Feb 7, 2020
ba328aa
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
xnkevinnguyen Feb 7, 2020
7551e5c
Microbit svg to a class with getters to get svg element
xnkevinnguyen Feb 7, 2020
4437284
Use refs for leds
xnkevinnguyen Feb 7, 2020
a109abc
Export messaging utils in a separate file
xnkevinnguyen Feb 7, 2020
dc73efb
Remove unused imports
xnkevinnguyen Feb 7, 2020
d859420
Messages from webview are made constant
xnkevinnguyen Feb 7, 2020
26358b0
Update snapshots
xnkevinnguyen Feb 7, 2020
84fd761
Change function name to onselectfile
xnkevinnguyen Feb 7, 2020
4e8e95e
Update typing for sending message
xnkevinnguyen Feb 10, 2020
6cbdf5b
updated create_message to use state copy
andreamah Feb 10, 2020
8d0438c
updated node usb native from vscode-arduino repo (#194)
andreamah Feb 10, 2020
a84f7fe
added listeners on buttons for backend
andreamah Feb 10, 2020
ee50718
fixed state updating for emitter
andreamah Feb 10, 2020
6b4f9f1
fixed state modification issue
andreamah Feb 10, 2020
767d14a
Add button emitter
xnkevinnguyen Feb 10, 2020
1266d12
Merge branch 'users/t-anmah/button-integration' of https://github.com…
xnkevinnguyen Feb 10, 2020
afc1a5a
fixed small state issue
andreamah Feb 10, 2020
3611b56
changed var name from state_copy to updated_state
andreamah Feb 10, 2020
2318a06
Merge branch 'dev' into users/t-anmah/frontend-backend-integration
andreamah Feb 10, 2020
f962c0e
Add safety on set state for cpx and microbit
xnkevinnguyen Feb 10, 2020
c510ba3
Merge branch 'users/t-anmah/frontend-backend-integration' of https://…
xnkevinnguyen Feb 10, 2020
8f4a1eb
Merge pull request #192 from microsoft/users/t-anmah/frontend-backend…
xnkevinnguyen Feb 10, 2020
86610b6
Modify format of messages from vscode api to python
xnkevinnguyen Feb 10, 2020
53b998f
Fix merge conflicts
xnkevinnguyen Feb 10, 2020
d8082fa
fixed integration bugs on backend
andreamah Feb 10, 2020
11f6262
Merge branch 'users/t-anmah/button-integration' of https://github.com…
andreamah Feb 10, 2020
549978c
Bind functions to simulator
xnkevinnguyen Feb 10, 2020
af56a1a
Merge branch 'users/t-anmah/button-integration' of https://github.com…
xnkevinnguyen Feb 10, 2020
cda4e75
Fix missing argument onmouseup
xnkevinnguyen Feb 10, 2020
6b38fcc
re-organized structure for autocorrect (#193)
andreamah Feb 10, 2020
c876f4f
button connections implemented
andreamah Feb 10, 2020
d669fdc
resolved merge conflicts
andreamah Feb 10, 2020
f97990e
some renaming
andreamah Feb 10, 2020
0525df8
initial work on sensor listeners
andreamah Feb 10, 2020
8dc2aee
first commit for sensors
Feb 10, 2020
1916b49
Updated tests
Feb 10, 2020
ae1a4eb
Updated tests
Feb 10, 2020
bc074f3
Merge branch 'users/t-vali/light-temp-accel-sensors' into users/t-anm…
andreamah Feb 10, 2020
20fc724
Added docs link
Feb 10, 2020
120f42d
Rearranged variables to be sorted
Feb 10, 2020
41d1a4a
Create accelerometer sensor
xnkevinnguyen Feb 10, 2020
0380c7a
Added set_accel helper function
Feb 10, 2020
b5a523b
Fixed bug
Feb 10, 2020
9a9b1c1
more progress on connecting backend to listener
andreamah Feb 10, 2020
fa0e7bb
Merge branch 'users/t-vali/light-temp-accel-sensors' into users/t-anm…
andreamah Feb 10, 2020
5f73a16
preliminary backend for sensors
andreamah Feb 10, 2020
c20029b
incorporated PR feedback
andreamah Feb 10, 2020
64491e4
Merge remote-tracking branch 'origin/users/t-anmah/button-integration…
xnkevinnguyen Feb 11, 2020
7d6b4c8
merged with button integration and resolved conflicts
andreamah Feb 11, 2020
4f4338e
Merge remote-tracking branch 'origin/users/t-anmah/sensor-integration…
xnkevinnguyen Feb 11, 2020
69896ea
Accelerometer and motion sensor pass props to three dimension sliders
xnkevinnguyen Feb 11, 2020
26ee1a8
added constants to microbit for sensors
andreamah Feb 11, 2020
8b872fe
Merge branch 'users/t-xunguy/sensors' into users/t-anmah/sensor-integ…
xnkevinnguyen Feb 11, 2020
5430209
Updated from PR comments
Feb 11, 2020
8e1afe9
Button interaction (#195)
xnkevinnguyen Feb 11, 2020
7411703
Updated accelerometer to throw exceptions when invalid acceleration
Feb 11, 2020
d200b1b
Updated temp and light_level to raise exception for invalid values
Feb 11, 2020
00cf238
Added init tests
Feb 11, 2020
4786d1c
Merged with dev
Feb 11, 2020
0d6d021
got sensors working
andreamah Feb 11, 2020
4c3fb2f
reformatted
andreamah Feb 11, 2020
d3309c2
removed comma
Feb 11, 2020
bb1052c
resolved merge conflicts
andreamah Feb 11, 2020
f0ec9d9
resolved merge conflict
andreamah Feb 11, 2020
1fc609a
accel error message changed
Feb 11, 2020
933b4ad
sorted imports
Feb 11, 2020
b46af05
Updated tests
Feb 11, 2020
8c86512
Update tests for snapshot with added toolbar
xnkevinnguyen Feb 11, 2020
039e440
Merge branch 'users/t-anmah/sensor-integration' of https://github.com…
xnkevinnguyen Feb 11, 2020
900dbd9
Merge branch 'users/t-vali/light-temp-accel-sensors' into users/t-anm…
andreamah Feb 11, 2020
d00ca9b
incorporated PR feedback
andreamah Feb 11, 2020
7b75f76
reformatting
andreamah Feb 11, 2020
f621753
first comimt
Feb 11, 2020
58f97a5
Remove any declerations of vscode that are duplicate to utils
xnkevinnguyen Feb 12, 2020
d7ff9f4
Updated for PR comments
Feb 12, 2020
a8cd70d
re-worked first-time dependency install (#198)
andreamah Feb 12, 2020
d1a4f3a
Merge branch 'users/t-vali/light-temp-accel-sensors' into users/t-anm…
andreamah Feb 12, 2020
df5edaf
updated from pr comments
Feb 12, 2020
3da2fd1
Merge branch 'dev' into users/t-anmah/sensor-integration
andreamah Feb 12, 2020
2e4e326
Added light, temperature and accelerometer on python side (#196)
vandyliu Feb 12, 2020
9fe133f
resolved merge conflicts
andreamah Feb 12, 2020
65d9d63
abstracted away updating into components
andreamah Feb 12, 2020
f760dc9
reformatting
andreamah Feb 12, 2020
06f7555
Update currently displayed image on webview according to command
xnkevinnguyen Feb 12, 2020
ff0d18f
Merge pull request #197 from microsoft/users/t-anmah/sensor-integration
xnkevinnguyen Feb 12, 2020
15a059c
some debugger work
andreamah Feb 12, 2020
f6c0ee3
Fix debugging missing function (#201)
xnkevinnguyen Feb 12, 2020
8f36dad
debug restructure
andreamah Feb 12, 2020
80cd19f
Fixed merge conflicts
Feb 12, 2020
5e9c90d
Reformat svg utils
xnkevinnguyen Feb 12, 2020
480002a
Merge branch 'users/t-vali/microbit-template' of https://github.com/m…
xnkevinnguyen Feb 12, 2020
0674c6f
Formatted with black
Feb 12, 2020
3043cb9
Merge branch 'users/t-vali/microbit-template' of https://github.com/m…
Feb 12, 2020
65720b2
Merge pull request #200 from microsoft/users/t-vali/microbit-template
xnkevinnguyen Feb 12, 2020
e20d4ad
resolved merge conflicts
andreamah Feb 12, 2020
429ef24
merged listeners
andreamah Feb 12, 2020
8eae513
fixed circular dependency
andreamah Feb 13, 2020
997719d
Remove duplicate emitter
xnkevinnguyen Feb 13, 2020
f657255
Load device into script tag for initial open
xnkevinnguyen Feb 13, 2020
cb0db0c
Merge branch 'users/t-xunguy/debugger-webview' into users/t-anmah/deb…
xnkevinnguyen Feb 13, 2020
8891bf5
Build status of azure pipelines in README.MD (#202)
vandyliu Feb 13, 2020
f7e5b52
modified debugger listener
andreamah Feb 13, 2020
88bff5e
connected microbit to debugger
andreamah Feb 13, 2020
9828f41
Load device on boot
xnkevinnguyen Feb 13, 2020
ecbaa38
Formatting app
xnkevinnguyen Feb 14, 2020
2e96340
Remove unused attribute to debug server
xnkevinnguyen Feb 14, 2020
395c266
Remove unused script tag
xnkevinnguyen Feb 14, 2020
ce37920
Updated nls commands
Feb 14, 2020
3de8c7f
Format extension
xnkevinnguyen Feb 14, 2020
da37af1
Remove tabs from webview
xnkevinnguyen Feb 14, 2020
e3fb24c
Load correct device on new file command (#203)
xnkevinnguyen Feb 15, 2020
e216888
Reformat buttons to make it clearer
xnkevinnguyen Feb 18, 2020
ad7f190
Update tests
xnkevinnguyen Feb 18, 2020
432bbd2
Merge branch 'dev' into users/t-xunguy/buttons-styling
xnkevinnguyen Feb 18, 2020
4ef0dff
Merge pull request #205 from microsoft/users/t-xunguy/remove-tabs
xnkevinnguyen Feb 18, 2020
b80ea14
Merge branch 'dev' into users/t-xunguy/buttons-styling
xnkevinnguyen Feb 18, 2020
294e82a
Adjusting command pallet
Feb 18, 2020
d7e9bca
Remove important property on css
xnkevinnguyen Feb 18, 2020
ea1986c
Merge pull request #206 from microsoft/users/t-xunguy/buttons-styling
xnkevinnguyen Feb 18, 2020
c5dddb8
handshake for client communication
andreamah Feb 19, 2020
95d20c5
Merge branch 'dev' into users/t-vali/command-pallet-reconfig
vandyliu Feb 19, 2020
a050aff
updated debugger client
andreamah Feb 19, 2020
b3f6567
modifications to active device microbit
andreamah Feb 19, 2020
7f5bdb2
Emit only when the calls are finished
xnkevinnguyen Feb 19, 2020
fb52ba9
Merge pull request #207 from microsoft/users/t-vali/command-pallet-re…
xnkevinnguyen Feb 19, 2020
4a7bea5
Add the Azure Boards badge to the README (#208)
smmatte Feb 19, 2020
297dd87
Reformatting
xnkevinnguyen Feb 19, 2020
ffecbf6
Update branch with dev
xnkevinnguyen Feb 19, 2020
2fb6f9f
fixed backend socket issue
andreamah Feb 19, 2020
5ab2a1b
disconnect works when program is done
andreamah Feb 20, 2020
836131a
Add tooltip for sensors
xnkevinnguyen Feb 20, 2020
8dcdca9
Lint changes
xnkevinnguyen Feb 20, 2020
7cde2cb
Update snapshot tests for the tooltip
xnkevinnguyen Feb 20, 2020
e4136cd
Remove unecessary space
xnkevinnguyen Feb 20, 2020
8512957
Update tests
xnkevinnguyen Feb 20, 2020
85af162
Merge pull request #212 from microsoft/users/t-xunguy/tooltip
xnkevinnguyen Feb 20, 2020
c480348
Initial implementation of the tracker
xnkevinnguyen Feb 20, 2020
797edbe
Added telemetry to typescript side of extension (#211)
vandyliu Feb 20, 2020
ca7d7ea
debugger work
andreamah Feb 20, 2020
62afc4d
Upgrade dependencies for security purposes
vandyliu Feb 20, 2020
b645302
backend cleanup
andreamah Feb 20, 2020
12f6458
Merge branch 'dev' into users/t-anmah/debugger
andreamah Feb 20, 2020
f537d35
Create messaging service class
xnkevinnguyen Feb 21, 2020
25f2d5a
Make messages constant
xnkevinnguyen Feb 21, 2020
e951947
remove temporary console logs
xnkevinnguyen Feb 21, 2020
10f483a
Update with latest debugger changes
xnkevinnguyen Feb 21, 2020
b616a7d
Send stacktrace message from adapter
xnkevinnguyen Feb 21, 2020
532d196
Output dependency installation failures to an output channel (#210)
eishan05 Feb 21, 2020
0dec72d
Establish connection for debug adapter and webview with the messaging…
xnkevinnguyen Feb 21, 2020
97cb358
Separated telemetry metrics for debugger (#214)
vandyliu Feb 21, 2020
6dbfc9d
Debug adapter sends start and stop message to webview
xnkevinnguyen Feb 21, 2020
e58caf6
Remove changes on button component
xnkevinnguyen Feb 21, 2020
b6abfd5
Reformatting
xnkevinnguyen Feb 21, 2020
1f977c4
Pause input if on breakpoint
xnkevinnguyen Feb 22, 2020
72b9f1e
Add telemetry for python (#213)
vandyliu Feb 22, 2020
da18aa7
Merge branch 'users/t-xunguy/dap' of https://github.com/microsoft/vsc…
xnkevinnguyen Feb 24, 2020
44daa13
Freeze buttons on svg
xnkevinnguyen Feb 24, 2020
470282d
src/adafruit_circuitplayground
andreamah Feb 24, 2020
e029bee
removed bad call from debug user code
andreamah Feb 24, 2020
997cf2a
Update with feedback
xnkevinnguyen Feb 24, 2020
79187f4
resolved merge conflicts
andreamah Feb 24, 2020
78821fb
Merge branch 'users/t-anmah/debugger' of https://github.com/microsoft…
andreamah Feb 24, 2020
389a2b2
Merge pull request #216 from microsoft/users/t-anmah/debugger
xnkevinnguyen Feb 24, 2020
9d3265e
added socket message for python process exit
andreamah Feb 25, 2020
c6e535e
Send message to python side on disconnect from vscode server side
xnkevinnguyen Feb 25, 2020
8cc304e
backend confirmation message
andreamah Feb 25, 2020
9fe8287
Confirm disconnect on python side
xnkevinnguyen Feb 25, 2020
58e989e
Debug Adapter Tracker Implementation (#217)
xnkevinnguyen Feb 26, 2020
85fed6b
Creating preview mode (#219)
vandyliu Feb 26, 2020
0ad646b
Update with dev
xnkevinnguyen Feb 26, 2020
d82263b
Lint files
xnkevinnguyen Feb 26, 2020
d3fb796
Keep the state for temperature sensor
xnkevinnguyen Feb 24, 2020
99b5d0d
Manage state for sensors on both cpx and microbit
xnkevinnguyen Feb 25, 2020
83901da
Reset sensor on reset-state message
xnkevinnguyen Feb 25, 2020
a987e9d
Lint files
xnkevinnguyen Feb 25, 2020
adc5749
Format files
xnkevinnguyen Feb 25, 2020
eb417fe
Disconnect frontend after timeout
xnkevinnguyen Feb 26, 2020
fef3c91
Add missing import for typing
xnkevinnguyen Feb 26, 2020
732e544
Remove a comment and console.log
xnkevinnguyen Feb 26, 2020
85c34a4
Merge pull request #220 from microsoft/users/t-xunguy/state-management
xnkevinnguyen Feb 26, 2020
877cd30
Virtual Environment Support for Dependencies (#218)
andreamah Feb 26, 2020
395e5d4
Fixed command palette bug (#227)
vandyliu Feb 27, 2020
ddb45b4
Readme Update and adding MD File for Store Upload (#224)
andreamah Feb 27, 2020
a690356
Release Note (#223)
andreamah Feb 27, 2020
c8f3b9d
Only disconnect socket io server on exit from port and not on restart
xnkevinnguyen Feb 27, 2020
b8d46b8
Merge branch 'dev' into users/t-anmah/debugger-socket-fix
xnkevinnguyen Feb 27, 2020
9e10e08
Format files
xnkevinnguyen Feb 27, 2020
04fb8ff
Merge branch 'users/t-anmah/debugger-socket-fix' of https://github.co…
xnkevinnguyen Feb 27, 2020
34be933
Remove unecessary logs
xnkevinnguyen Feb 27, 2020
5be7f32
Save previous debugger to disconnect
xnkevinnguyen Feb 27, 2020
11ac3d8
Merge pull request #221 from microsoft/users/t-anmah/debugger-socket-fix
xnkevinnguyen Feb 27, 2020
89d9fe8
Release Note Fix (#229)
andreamah Feb 27, 2020
3d21ebb
Venv fixes (#228)
andreamah Feb 27, 2020
6cf1ad6
More Venv Fixes + Dependency Fail Detect on Python (#231)
andreamah Feb 28, 2020
1e839d9
Fix venv setup for UNIX (#232)
andreamah Feb 29, 2020
70f553c
micro:bit key presses functionality (accessibility) (#222)
vandyliu Mar 2, 2020
fea29fb
Ab text fix
xnkevinnguyen Mar 2, 2020
10ef8bf
Fix issue on mac os when using track_event
xnkevinnguyen Mar 2, 2020
879659c
Use description foreground
xnkevinnguyen Mar 3, 2020
5a639fe
Merge branch 'dev' into users/t-xunguy/ab-fix
xnkevinnguyen Mar 3, 2020
5978085
Lint files
xnkevinnguyen Mar 3, 2020
65320b5
Merge pull request #236 from microsoft/users/t-xunguy/hotfix-telemetry
xnkevinnguyen Mar 3, 2020
c91f02e
Merge branch 'dev' into users/t-xunguy/ab-fix
xnkevinnguyen Mar 3, 2020
f1a8e15
Update test with css change
xnkevinnguyen Mar 3, 2020
49dfdae
Merge branch 'users/t-xunguy/ab-fix' of https://github.com/microsoft/…
xnkevinnguyen Mar 3, 2020
0b7e5b4
Deploy code to micro:bit and removed need to rename file to deploy to…
vandyliu Mar 4, 2020
94019e0
Merge branch 'dev' into users/t-xunguy/ab-fix
xnkevinnguyen Mar 4, 2020
f5fca46
Handle active editor undefined
xnkevinnguyen Mar 4, 2020
1265ca0
Merge pull request #238 from microsoft/users/t-xunguy/ab-fix
xnkevinnguyen Mar 4, 2020
dd1d702
Merge branch 'dev' into users/t-xunguy/file-selection-fix
xnkevinnguyen Mar 4, 2020
98c8f33
Allows unicode characters (eg. Japanese) in the python files that are…
vandyliu Mar 4, 2020
0138d86
Export file selection service
xnkevinnguyen Mar 4, 2020
bc5d090
Get serial monitor working with micro:bit and CPX (#242)
vandyliu Mar 4, 2020
4f77c7d
Abstract deviceselection, file selection from extension
xnkevinnguyen Mar 5, 2020
3f3c9b4
Remove duplicate code
xnkevinnguyen Mar 5, 2020
4751373
Merge branch 'dev' into users/t-xunguy/file-selection-fix
xnkevinnguyen Mar 5, 2020
18bc94b
Fix an undefined variable error because of mistyping
xnkevinnguyen Mar 5, 2020
5864562
Lint files
xnkevinnguyen Mar 5, 2020
625ade8
Merge branch 'dev' into users/t-xunguy/refactor
xnkevinnguyen Mar 5, 2020
1620f0f
Remove commented out code
xnkevinnguyen Mar 5, 2020
b812b59
Merge branch 'users/t-xunguy/refactor' of https://github.com/microsof…
xnkevinnguyen Mar 5, 2020
33828ab
Venv Telemetry and Structure Refactoring (#240)
andreamah Mar 5, 2020
bf308a9
Merge branch 'dev' into users/t-xunguy/file-selection-fix
xnkevinnguyen Mar 5, 2020
c66967b
Fix tests for mac os
xnkevinnguyen Mar 5, 2020
66e803e
Fix missing dependency for playing sound on mac
xnkevinnguyen Mar 5, 2020
b8fcf43
Merge pull request #241 from microsoft/users/t-xunguy/file-selection-fix
xnkevinnguyen Mar 5, 2020
de43ea6
Make python a constant
xnkevinnguyen Mar 5, 2020
66fde0f
Update with dev
xnkevinnguyen Mar 5, 2020
561be31
Lint files
xnkevinnguyen Mar 5, 2020
e843b52
Merge branch 'dev' into users/t-xunguy/fix-mac-sound
xnkevinnguyen Mar 6, 2020
a79e615
Merge pull request #244 from microsoft/users/t-xunguy/refactor
xnkevinnguyen Mar 6, 2020
4ccd2b3
Format files
xnkevinnguyen Mar 6, 2020
6b49066
Merge branch 'dev' into users/t-xunguy/fix-mac-sound
xnkevinnguyen Mar 6, 2020
352c6e5
Merge pull request #247 from microsoft/users/t-xunguy/fix-mac-sound
xnkevinnguyen Mar 6, 2020
f1f1072
Restructuring requirements.txt to remove dev dependencies
vandyliu Mar 6, 2020
48af30c
Fix merge conflicts for dev
xnkevinnguyen Mar 9, 2020
1b79fbf
Remove duplicate
xnkevinnguyen Mar 9, 2020
42d788f
Merge pull request #255 from microsoft/users/t-xunguy/dev-update
xnkevinnguyen Mar 9, 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ out/
!locales/**/out/
package.nls.*.json

# virtual environment
venv/

# testing
.vscode-test

Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
}
128 changes: 82 additions & 46 deletions README.md

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5829,6 +5829,26 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


uflash
The MIT License (MIT)
Copyright (c) 2015-2018 Nicholas H.Tollervey and others.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-------------------------------------------------------------------

-------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions docs/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Commands are accessible through :

- **Open Simulator** : opens the webview of the simulator.

- **New File** : opens an unsaved file with links to help you and a code snippet that you can save as `code.py` / `main.py`.
- **New File** : opens an unsaved file to help you and a code snippet that you can save and play around with.
_(**Note :** will open the simulator webview if it's not open yet)_.

- **Run Simulator** : runs the code you have opened in the simulator (make sure you've clicked on a valid code file).
_(**Note :** will open the simulator webview if it's not open yet)_.

- **Deploy to Device** : saves the code to a Circuit Playground Express.
_(**Note :** the board needs to be correctly formatted to a `CIRCUITPY` drive first. If that's not the case check [Installing CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython) to correctly format it)_.
- **Deploy to Device** : saves the code to the connected device.
_(**Note :** For the Circuit Playground Express, the board needs to be correctly formatted to a `CIRCUITPY` drive first. If that's not the case check [Installing CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython) to correctly format it)_.

* **Select Serial Port** : selects the serial port of the board you want the serial monitor to interact with. (2)
_(**Note :** USB detection must be enabled in the extension settings.)_
Expand Down Expand Up @@ -82,7 +82,7 @@ Here are the settings you can change in the Device Simulator Express configurati
- The first time you install the extension, you'll need to execute the `run` command at least once in order to access auto-completion.
- While running a code file, if you get an error saying it can't find the file, make sure you've clicked on a valid Python code file before running it.
- To open the output panel again after closing it go to VS Code menu : `View->Output`.
- If you try to deploy to the device while it's plugged in but you still get an error saying it cannot find the board, make sure your Circuit Playground Express is formatted correctly and that its name matches `CIRCUITPY`.
- For the Circuit Playground Express, if you try to deploy to the device while it's plugged in but you still get an error saying it cannot find the board, make sure your Circuit Playground Express is formatted correctly and that its name matches `CIRCUITPY`.
- If you can't get the Simulator communication working while debugging, try to open you `Settings` and check the port used under `'Device Simulator Express: Debugger Server Port'`. You can either change it (usually ports above 5000 could work) or try to free it, then start debugging again.

### Notes
Expand Down
276 changes: 141 additions & 135 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,135 +1,141 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

const gulp = require("gulp");

const ts = require("gulp-typescript");
const sourcemaps = require("gulp-sourcemaps");
const typescript = require("typescript");
const del = require("del");
const es = require("event-stream");
const vsce = require("vsce");
const nls = require("vscode-nls-dev");

const tsProject = ts.createProject("./tsconfig.json", { typescript });

const inlineMap = true;
const inlineSource = false;
const outDest = "out";

// A list of all locales supported by VSCode can be found here: https://code.visualstudio.com/docs/getstarted/locales
const languages = [{ folderName: "en", id: "en" }];

gulp.task("clean", () => {
return del(
[
"out/*",
"package.nls.*.json",
"../../dist/*0.0.0-UNTRACKEDVERSION.vsix"
],
{ force: true }
);
});

const pythonToMove = [
"./src/adafruit_circuitplayground/*.*",
"./src/*.py",
"./src/requirements.txt",
];

gulp.task("python-compile", () => {
// the base option sets the relative root for the set of files,
// preserving the folder structure
return gulp.src(pythonToMove, { base: "./src/" }).pipe(gulp.dest("out"));
});

gulp.task("internal-compile", () => {
return compile(false);
});

gulp.task("internal-nls-compile", () => {
return compile(true);
});

gulp.task("add-locales", () => {
return gulp
.src(["package.nls.json"])
.pipe(nls.createAdditionalLanguageFiles(languages, "locales"))
.pipe(gulp.dest("."));
});

gulp.task("vsce:publish", () => {
return vsce.publish();
});

gulp.task("vsce:package", () => {
return vsce.createVSIX({
packagePath: "../../dist/deviceSimulatorExpress-0.0.0-UNTRACKEDVERSION.vsix"
});
});

gulp.task(
"compile",
gulp.series("clean", "internal-compile", "python-compile", callback => {
callback();
})
);

gulp.task(
"build",
gulp.series(
"clean",
"internal-nls-compile",
"python-compile",
"add-locales",
callback => {
callback();
}
)
);

gulp.task(
"publish",
gulp.series("compile", "vsce:publish", callback => {
callback();
})
);

gulp.task(
"package",
gulp.series("compile", "vsce:package", callback => {
callback();
})
);

//---- internal

function compile(buildNls) {
var r = tsProject
.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.js.pipe(buildNls ? nls.rewriteLocalizeCalls() : es.through())
.pipe(
buildNls
? nls.createAdditionalLanguageFiles(languages, "locales", "out")
: es.through()
);

if (inlineMap && inlineSource) {
r = r.pipe(sourcemaps.write());
} else {
r = r.pipe(
sourcemaps.write("../out", {
// no inlined source
includeContent: inlineSource,
// Return relative source map root directories per file.
sourceRoot: "../src"
})
);
}

return r.pipe(gulp.dest(outDest));
}
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

const gulp = require("gulp");

const ts = require("gulp-typescript");
const sourcemaps = require("gulp-sourcemaps");
const typescript = require("typescript");
const del = require("del");
const es = require("event-stream");
const vsce = require("vsce");
const nls = require("vscode-nls-dev");

const tsProject = ts.createProject("./tsconfig.json", { typescript });

const inlineMap = true;
const inlineSource = false;
const outDest = "out";

// A list of all locales supported by VSCode can be found here: https://code.visualstudio.com/docs/getstarted/locales
const languages = [{ folderName: "en", id: "en" }];

gulp.task("clean", () => {
return del(
[
"out/*",
"package.nls.*.json",
"../../dist/*0.0.0-UNTRACKEDVERSION.vsix",
],
{ force: true }
);
});

const pythonToMove = [
"./src/adafruit_circuitplayground/*.*",
"./src/microbit/*.*",
"./src/microbit/!(test)/**/*",
"./src/*.py",
"./src/common/*.py",
"./src/dev-requirements.txt",
"./src/requirements.txt",
"./src/templates/*.*"
];

gulp.task("python-compile", () => {
// the base option sets the relative root for the set of files,
// preserving the folder structure
return gulp.src(pythonToMove, { base: "./src/" }).pipe(gulp.dest("out"));
});

gulp.task("internal-compile", () => {
return compile(false);
});

gulp.task("internal-nls-compile", () => {
return compile(true);
});

gulp.task("add-locales", () => {
return gulp
.src(["package.nls.json"])
.pipe(nls.createAdditionalLanguageFiles(languages, "locales"))
.pipe(gulp.dest("."));
});

gulp.task("vsce:publish", () => {
return vsce.publish();
});

gulp.task("vsce:package", () => {
return vsce.createVSIX({
packagePath:
"../../dist/deviceSimulatorExpress-0.0.0-UNTRACKEDVERSION.vsix",
});
});

gulp.task(
"compile",
gulp.series("clean", "internal-compile", "python-compile", callback => {
callback();
})
);

gulp.task(
"build",
gulp.series(
"clean",
"internal-nls-compile",
"python-compile",
"add-locales",
callback => {
callback();
}
)
);

gulp.task(
"publish",
gulp.series("compile", "vsce:publish", callback => {
callback();
})
);

gulp.task(
"package",
gulp.series("compile", "vsce:package", callback => {
callback();
})
);

//---- internal

function compile(buildNls) {
var r = tsProject
.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.js.pipe(buildNls ? nls.rewriteLocalizeCalls() : es.through())
.pipe(
buildNls
? nls.createAdditionalLanguageFiles(languages, "locales", "out")
: es.through()
);

if (inlineMap && inlineSource) {
r = r.pipe(sourcemaps.write());
} else {
r = r.pipe(
sourcemaps.write("../out", {
// no inlined source
includeContent: inlineSource,
// Return relative source map root directories per file.
sourceRoot: "../src",
})
);
}

return r.pipe(gulp.dest(outDest));
}
8 changes: 2 additions & 6 deletions locales/en/out/constants.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"dialogResponses.readInstall": "Read installation docs",
"error.debuggerServerInitFailed": "Warning : The Debugger Server cannot be opened. Please try to free the port {0} if it's already in use or select another one in your Settings 'Device Simulator Express: Debugger Server Port' and start another debug session.\n You can still debug your code but you won't be able to use the Simulator.",
"error.debuggingSessionInProgress": "[ERROR] A debugging session is currently in progress, please stop it before running your code. \n",
"error.incorrectFileNameForDevice": "[ERROR] Can\\'t deploy to your Circuit Playground Express device, please rename your file to \"code.py\" or \"main.py\". \n",
"error.incorrectFileNameForDevicePopup": "Seems like you have a different file name than what the CPX requires, please rename it to \"code.py\" or \"main.py\".",
"error.incorrectFileNameForSimulatorPopup": "We want your code to work on your actual board as well. Make sure you name your file \"code.py\" or \"main.py\" to be able to run your code on an actual physical device.",
"error.invalidFileNameDebug": "The file you tried to debug isn\\'t named \"code.py\" or \"main.py\\. Rename your file if you want your code to work on your actual device.",
"error.noDevice": "No plugged in boards detected. Please double check if your board is connected and/or properly formatted",
"error.noFileToRun": "\n[ERROR] We can't find the .py file to run on simulator. Open up a new .py file, or browse through some examples\n",
"error.noFolderCreated": "In order to use the Serial Monitor, you need to open a folder and reload VS Code.",
Expand All @@ -27,7 +23,7 @@
"info.deploySimulator": "\n[INFO] Deploying code to the simulator...\n",
"info.deploySuccess": "\n[INFO] Code successfully deployed\n",
"info.extensionActivated": "Congratulations, your extension Adafruit_Simulator is now active!",
"info.firstTimeWebview": "To reopen the simulator click on the \"Open Simulator\" button on the upper right corner of the text editor, or select the command \"Open Simulator\" from command palette.",
"info.firstTimeWebview": "To reopen the simulator select the command \"Open Simulator\" from command palette.",
"info.installPythonDependencies": "Do you want us to try and install this extensions dependencies for you?",
"error.invalidFileExtensionDebug": "The file you tried to run isn\\'t a Python file.",
"info.newFile": "New to Python or the Circuit Playground Express? We are here to help!",
Expand All @@ -36,7 +32,7 @@
"info.privacyStatement": "Privacy Statement",
"info.successfulInstall": "Successfully installed Python dependencies.",
"info.thirdPartyWebsite": "By clicking \"Agree and Proceed\" you will be redirected to adafruit.com, a third party website not managed by Microsoft. Please note that your activity on adafruit.com is subject to Adafruit's privacy policy",
"info.welcomeOutputTab": "Welcome to the Adafruit Simulator output tab!\n\n",
"info.welcomeOutputTab": "Welcome to the Device Simulator Express output tab!\n\n",
"label.webviewPanel": "Device Simulator Express",
"name": "Device Simulator Express",

Expand Down
Loading