1
0
Форкнуть 0

Updated code owners, fixed some spelling errors and improved sections of README (#168)

* Fixed some spelling errors and improved sections of README and other docs

* Updated quotation marks to be consistent

* Updated developers section to be more understandable

* Updated code owners to include Garage coaches
This commit is contained in:
Vandy Liu 2020-01-21 15:48:54 -08:00 коммит произвёл GitHub
Родитель 1a9ad58262
Коммит 4361a23021
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 64 добавлений и 65 удалений

2
.github/CODEOWNERS поставляемый
Просмотреть файл

@ -1,3 +1,3 @@
# At least one of the code owners below will be required on each PR:
* @markAtMicrosoft @smmatte @adclements @abmahdy @LukeSlev @iennae
* @markAtMicrosoft @smmatte @adclements @abmahdy @iennae @nasadigital @isadorasophia @sagarmanchanda

Просмотреть файл

@ -5,7 +5,7 @@ Circuit Playground Express (CPX) projects! Test and debug your code on the devic
result when you plug in your actual microcontroller. Curious about the output of the device, the serial
monitor allows you to observe the device output.
![CircuitPlayground Express](https://www.microsoft.com/en-us/garage/wp-content/uploads/sites/5/2019/08/cpx.jpg)
<img alt='CircuitPlayground Express' src=https://raw.githubusercontent.com/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/cpx.jpg>
## Features
@ -29,7 +29,7 @@ monitor allows you to observe the device output.
- Temperature sensor
- 7 Capacitive Touch sensors
The simulator supports most of the sensors on CPX except **IR transmitter & Receiver**, **Sound Sensor (microphone)**, **Speaker (Play Tone)** and the **“tap” on Motion Sensor**.
The simulator supports most of the sensors on CPX except **IR transmitter & Receiver**, **Sound Sensor (microphone)**, **Speaker (Play Tone)** and the **"tap" on Motion Sensor**.
The code related to these sensors can still run on the actual CPX board and be deployed using Device Simulator Express.
As we only support CPX library now, other libraries (i.e. simpleio) cant run on the simulator. But they will work on the actual device!
@ -58,38 +58,38 @@ The following dependecies can be installed for you by the extension by clicking
install by typing the following commands in a console: `pip install applicationinsights`
## Useful Links
- Tutorials and Example Code for Adafruit CPX:
- Adafruit CPX library tutorial: (https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express/circuit-playground-express-library)
- Adafruit CPX Examples on GitHub: (https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/tree/master/examples)
- Adafruit CPX Guided Tour (Intro for the Hardware) (https://learn.adafruit.com/adafruit-circuit-playground-express/guided-tour)
- [Adafruit CPX library tutorial](https://learn.adafruit.com/circuitpython-made-easy-on-circuit-playground-express/circuit-playground-express-library)
- [Adafruit CPX Examples on GitHub](https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/tree/master/examples)
- [Adafruit CPX Guided Tour (Intro for the Hardware)](https://learn.adafruit.com/adafruit-circuit-playground-express/guided-tour)
- Format Adafruit CPX device:
- Tutorial for formatting Adafruit CPX for CircuitPython (https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)
- Download Firmware .uf2 file (https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart)
- Download the latest version of the Adafruit CPX library (link: https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries)
- [Tutorial for formatting Adafruit CPX for CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)
- [Download Firmware .uf2 file](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart)
- [Download the latest version of the Adafruit CPX library](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries)
- For developers:
- [Steps to run the extension locally](/docs/developers-setup.md)
## How to use
To use Device Simulator Express, install the extension from the marketplace and reload VS Code.
### 1. Start with the “New File” Command.
### 1. Start with the "New File" Command.
1. Type in Device Simulator Express: New File” in the command palette(`CTRL+SHIFT+P`to open the command palette).
!["New File" animation](https://www.microsoft.com/en-us/garage/wp-content/uploads/sites/5/2019/08/newFile.gif)
2. Name and save your file somewhere, and were good to go!(3)
3. Start with some examples: you can find examples files and tutorials inside the comments,
as well as in the notification pop up when you run the `“Device Simulator Express: New File”` Command.
1. Type in `"Device Simulator Express: New File"` in the command palette (`CTRL+SHIFT+P` to open the command palette).
<img alt='"New File" animation' src=https://raw.githubusercontent.com/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/newFile.gif>
2. Name and save your file somewhere, and were good to go! (3)
3. Start with some examples: you can find examples files and tutorials inside the comments, as well as in the notification pop up when you run the `"Device Simulator Express: New File"` Command.
![How to find example code screenshot](https://www.microsoft.com/en-us/garage/wp-content/uploads/sites/5/2019/08/findExamples.jpg)
<img alt='How to find example code screenshot' src=https://raw.githubusercontent.com/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/findExamples.jpg>
### 2. Start from an existing python file.
1. Open the folder or your .py file in Visual Studio Code.
2. Run `open Simulator` from the command palette or icon in the editor toolbar.
### 3. Run your code on the simulator .
### 3. Run your code on the simulator.
![How to run the simulator animation](https://www.microsoft.com/en-us/garage/wp-content/uploads/sites/5/2019/08/run.gif)
<img alt='How to run the simulator animation' src='https://github.com/microsoft/vscode-python-devicesimulator/blob/dev/assets/readmeFiles/run.gif?raw=true'>
- Run `Run Simulator` from the command palette or icon in the editor toolbar.
- You can use the `Play` or `Refresh` button on the simulator webview.
@ -100,14 +100,14 @@ Before deploying the python code to your CPX device, you need to format your dev
1. Download the firmware with the .uf2 file (link: https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart)
2. Download the lastest version of the cpx library (link: https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries).
**_Note:_** Make sure you name your file main.py or code.py: the device automatically runs the first file that is likely named.
**_Note:_** Make sure you name your file `main.py` or `code.py`: the device automatically runs the first file that is likely named. This is the convention for CircuitPython ([source](https://learn.adafruit.com/welcome-to-circuitpython/creating-and-editing-code#naming-your-program-file-7-32)).
!["Deploy to Device" example](https://www.microsoft.com/en-us/garage/wp-content/uploads/sites/5/2019/08/deployToBoard.png)
<img alt="Deploy to Device" src=https://raw.githubusercontent.com/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/deployToBoard.png>
### 5. Use the Serial Monitor for your Adafruit CPX device(available Windows and Mac only)
### 5. Use the Serial Monitor for your Adafruit CPX device (available on Windows and Mac only)
1. Plug in your CPX device (make sure its formatted properly already)
2. Run the command `Device Simulator Express: Open Serial Monitor`
2. Run the command `"Device Simulator Express: Open Serial Monitor"`
3. Select your baud rate for the serial port
4. The print() statements in your code will show in the output console
@ -129,7 +129,7 @@ or by using the toolbar.
Device Simulator Express provides several commands in the Command Palette (F1 or Ctrl + Shift + P/ Cmd + Shift + P for Mac OS) for working with \*.py files:
- `Device Simulator Express: New File`: Opens an unsaved .py file with template code, also open the simulator.
- `Device Simulator Express: New File`: Opens an unsaved .py file with template code, also opens the simulator.
- `Device Simulator Express: Open Simulator`: Opens the simulator in the webView
- `Device Simulator Express: Run on Simulator`: Runs python code on the simulator
- `Device Simulator Express: Deploy to Device`: Copies & Pastes the code.py or main.py file to CIRCUITPY drive if detected a CPX is plugged in
@ -186,7 +186,7 @@ A `ThirdPartyNotices.txt` file is provided in the extension's source code listin
- To open the output panel again after closing it go to VS Code menu: `View->Output`.
- If you have pylint enabled, it might underline the import of the adafruit_circuitplayground library, but it will work correctly.
- 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 your `Settings` and check the port used under `'Device Simulator Express: Debugger Server Port'`. You can either change it (usually ports above 5000 should work) or try to free it, then start debugging again.
- If you can't get the Simulator communication working while debugging, try to open your `Settings` and check the port used under `"Device Simulator Express: Debugger Server Port"`. You can either change it (usually ports above 5000 should work) or try to free it, then start debugging again.
- When you are using the serial monitor, if you get some unusual error messages, unplug the device and reload the VS Code windows.
## License
@ -217,6 +217,6 @@ A `ThirdPartyNotices.txt` file is provided in the extension's source code listin
## Notes
(1) Note: the easiest way to do it is to select the "Add to PATH" option directly when you install Python. Otherwise you can search how to insert it manually, but make sure that when you type _python_ in a terminal, the command is recognized and have the correct version.
(2) You can chose to see to see the prompt or not by changing the extension configirations.
(3) To be able to run the file from your physical device, it should either be named code.py or main.py.
1. Make sure that when you type _python_ in a terminal, the command is recognized and you have the correct version. The easiest way to do it is to select the "Add to PATH" option directly when you install Python. Otherwise you can search how to insert it manually.
2. You can choose to see the prompt or not by changing the extension configurations.
3. To be able to run the file on your physical device, it should either be named code.py or main.py.

Просмотреть файл

@ -19,7 +19,7 @@
- **Note:** On extension activation you will be prompted a popup asking if you want the modules to be automatically installed for you, **except** `pywin32` which is needed only on Windows platform.
- Playsound
- Run the command in a console : `pip install playsound`
- pytest
- Pytest
- Run the command in a console : `pip install pytest`
- Pywin32
- **Note:** This is only needed for Windows computers. You must install it manually with the above command!
@ -35,7 +35,7 @@
* Python extension for VS Code (download from VS Code market place)
## Steps to Get Started Running the Extension in Debug Mode
## Steps to Get Started Running the Extension Locally
1. Make sure you have all the dependencies installed (Node, Python, Playsound, VS Code, Python VS Code extension)
@ -47,12 +47,12 @@
5. Run the command : `npm run compile`
6. Start debugging the extension by pressing F5 or going to VS Code Debug menu and select 'Start debugging'
6. Start running the extension locally by pressing F5 or going to VS Code Debug menu and select 'Start debugging'
## Notes on how to use it
- [Documentation to use the Extension](/docs/how-to-use.md)
- Debugging the extension opens a new VS Code window with the extension installed
- Debugging the extension opens a new VS Code window with the local build of the extension
- From the original VS Code window (opened in our repository) you can see outputs in the Debug Console
- In the new VS Code window, you can access the commands provided by the extension from the Commands Palette (Ctrl+Shift+P)
listed as 'Device Simulator Express : ...'

Просмотреть файл

@ -2,7 +2,7 @@
Commands are accessible through :
- **The command palette** (`Ctrl+shift+P` or `View->Command Palette`) and type 'Device Simulator Express : `command_name`'
- **The command palette** (`Ctrl+Shift+P` or `View->Command Palette`) and type 'Device Simulator Express : `command_name`'
- **The extension buttons** available on the top right of the Text Editor Panel when you have a Python file open (1)
## Available commands
@ -12,11 +12,11 @@ Commands are accessible through :
- **New File** : opens an unsaved file with links to help you and a code snippet that you can save as `code.py` / `main.py`.
_(**Note :** will open the simulator webview if it's not open yet)_.
- **Run Simulator** : run the code you have open on the simulator (make sure you've clicked on a valid code file).
- **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 it's not the case : [Installing CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython))_.
_(**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)_.
* **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.)_

Просмотреть файл

@ -23,7 +23,7 @@ _Note: You need to install all the dependencies in order to use the extension._
- [Python VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
- **Note:** This extension is installed automatically from the marketplace when you install our extension
- Python Modules
- **Note:** On extension activation you will be prompted a popup asking if you want the modules to be automatically installed for you, **except** `pywin32` which is needed only on Windows platform.
- **Note:** On extension activation a popup will be prompted asking if you want the modules to be automatically installed for you, **except** `pywin32` which is needed only on Windows platform.
- Playsound : `pip install playsound`
- Pywin32 : `pip install pywin32`
- **Note:** This is only needed for Windows computers. You must install it manually with the above command!

Просмотреть файл

@ -35,7 +35,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 Adafruit Simulator output tab!\n\n",
"label.webviewPanel": "Device Simulator Express",
"name": "Device Simulator Express",

Просмотреть файл

@ -14,29 +14,29 @@
],
"preview": true,
"license": "MIT",
"homepage": "https://github.com/microsoft/vscode-python-devicesimulator",
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode-python-devicesimulator"
},
"bugs": {
"url": "https://github.com/microsoft/vscode-python-devicesimulator/issues"
},
"keywords": [
"python",
"CircuitPython",
"Adafruit"
],
"activationEvents": [
"onCommand:deviceSimulatorExpress.openSerialMonitor",
"onCommand:deviceSimulatorExpress.openSimulator",
"onCommand:deviceSimulatorExpress.runSimulator",
"onCommand:deviceSimulatorExpress.newFile",
"onCommand:deviceSimulatorExpress.runDevice",
"onCommand:deviceSimulatorExpress.runSimulatorEditorButton",
"onCommand:deviceSimulatorExpress.selectSerialPort",
"onDebug"
],
"homepage": "https://github.com/microsoft/vscode-python-devicesimulator",
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode-python-devicesimulator"
},
"bugs": {
"url": "https://github.com/microsoft/vscode-python-devicesimulator/issues"
},
"keywords": [
"python",
"CircuitPython",
"Adafruit"
],
"activationEvents": [
"onCommand:deviceSimulatorExpress.openSerialMonitor",
"onCommand:deviceSimulatorExpress.openSimulator",
"onCommand:deviceSimulatorExpress.runSimulator",
"onCommand:deviceSimulatorExpress.newFile",
"onCommand:deviceSimulatorExpress.runDevice",
"onCommand:deviceSimulatorExpress.runSimulatorEditorButton",
"onCommand:deviceSimulatorExpress.selectSerialPort",
"onDebug"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
@ -174,13 +174,12 @@
"default": true,
"scope": "resource"
},
"pacifica.showNewFilePopup": {
"deviceSimulatorExpress.showNewFilePopup": {
"type": "boolean",
"default": true,
"scope": "resource"
},
"deviceSimulatorExpress.debuggerServerPort": {
"type": "number",
"default": 5577,
"description": "%deviceSimulatorExpressExtension.configuration.properties.debuggerPort%",

Просмотреть файл

@ -137,7 +137,7 @@ class Express:
def adjust_touch_threshold(self, adjustement):
"""Not implemented!
The Pacifica Simulator doesn't use capacitive touch threshold.
The CPX Simulator doesn't use capacitive touch threshold.
"""
telemetry_py.send_telemetry("ADJUST_THRESHOLD")
raise NotImplementedError(

Просмотреть файл

@ -18,7 +18,7 @@ const localize: nls.LocalizeFunc = nls.config({
export const CONFIG = {
SHOW_DEPENDENCY_INSTALL: "deviceSimulatorExpress.showDependencyInstall",
SHOW_NEW_FILE_POPUP: "pacifica.showNewFilePopup"
SHOW_NEW_FILE_POPUP: "deviceSimulatorExpress.showNewFilePopup"
};
export const CONSTANTS = {
@ -191,7 +191,7 @@ export const CONSTANTS = {
),
WELCOME_OUTPUT_TAB: localize(
"info.welcomeOutputTab",
"Welcome to the Adafruit Simulator output tab !\n\n"
"Welcome to the Adafruit Simulator output tab!\n\n"
)
},
LABEL: {