-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
98 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/node_modules | ||
/out | ||
exampleFiles/SPINUPfield.pawdraw | ||
*.vsix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Andrew Curtis | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,58 @@ | ||
# Cat Customs - Custom Editor API Samples | ||
|
||
![Paw draw editor ](documentation/example.png) | ||
|
||
Demonstrates VS Code's [custom editor API](https://code.visualstudio.com/api/extension-guides/custom-editors) using two custom editors: | ||
|
||
- Cat Scratch — Uses the finalized custom text editor api to provide a custom editor for `.cscratch` files (which are just json files) | ||
- Paw Draw - Uses the binary custom editor api to provide a custom editor for `.pawdraw` files (which are just png files with a different file extension). | ||
|
||
## VS Code API | ||
|
||
### `vscode` module | ||
|
||
- [`window.registerCustomEditorProvider`](https://code.visualstudio.com/api/references/vscode-api#window.registerCustomEditorProvider) | ||
- [`CustomTextEditor`](https://code.visualstudio.com/api/references/vscode-api#CustomTextEditor) | ||
- [`CustomEditor`](https://code.visualstudio.com/api/references/vscode-api#CustomEditor) | ||
|
||
## Running the example | ||
|
||
- Open this example in VS Code 1.46+ | ||
- `npm install` | ||
- `npm run watch` or `npm run compile` | ||
- `F5` to start debugging | ||
|
||
Open the example files from the `exampleFiles` directory. | ||
# Auton Builder for Vex Robotics Competition | ||
A graphical editor for vrc autons. | ||
![Auton Editor Example](documentation/example.png) | ||
## What it does | ||
This extension allows programmers to easily create and modify autons in the form of a .vauton (json) file. This file can then be downloaded onto an Micro SD card and interpreted by the program on the robot. | ||
|
||
> _**Note:**_ This extension does not handle how the auton will be performed, it only provides the information that comprises the auton. | ||
## Use | ||
- Interface | ||
- Robot - Represents state of the robot at the current auton node | ||
- Margin of error (red circle) - indicates the range robot will try to get to before moving onto the next node | ||
- Field - VRC Spin Up Field | ||
- Action Bar - Represents actions that robot will perform at the current auton node | ||
- Intake | ||
- Shoot | ||
- Piston Shoot | ||
- Roller | ||
- Expand | ||
- Node Index - shows index of current node (top right) | ||
- Controls | ||
- Movement | ||
- Left Click & Drag - Move the robot around | ||
- Arrow Keys / WASD - Move the robot around | ||
- Left Click + Alt - Rotate robot towards mouse pointer | ||
- R - Rotate robot 90 degrees (can be modified with shift) | ||
- C - Rotate robot to a heading of 0 | ||
- Margin Of Error | ||
- Left Click & Drag - Modify margin of error | ||
- Node Management | ||
- J - Go to previous node | ||
- L - Go to next node | ||
- N - Create new node after this node | ||
- Delete - remove current note | ||
> _**Note:**_ Keybindings cannot be modified | ||
## Installation | ||
1. Go To the desired release ([0.0.2-pre-alpha](https://github.com/meisZWFLZ/AutonGUI/releases/tag/v0.0.2-pre-alpha)) and download the .vsix file | ||
2. Install using any of the below methods | ||
- Open the folder containing the .vsix file in VS Code. Then right click on the .vsix and select `Install Extension VSIX`. | ||
- In VS Code run the `Extensions: Install from VSIX...` command. | ||
- In a terminal, run the following command | ||
`code --install-extension /path/to/file/vrc-auton-0.0.1.vsix` | ||
## Auton Data Structure | ||
The .vauton file that this extension creates is just a .json file. This json is an array of auton nodes each containing an position value and an array of actions | ||
- Auton Node | ||
- `"position": Position & HasMarginOfError` - Represents the position the robot will go to. | ||
- `"x": number` - x coordinate in inches, 0 to 144. 0 being closest to the blue driver station and 144 being closest to the red driver station. | ||
- `"y": number` - y coordinate in inches, 0 to 144. 0 being closest to the audience and 144 being closest to the referees. | ||
- `"heading": number` - heading in degrees, 0 to 360. 0 being facing towards the audience and 90 facing the red driver station | ||
- `"marginOfError": number` - margin of error in inches, positive float. Acceptable distance from target point for robot to go onto the next node. | ||
- `"actions": ACTION[]` - unique array of enumerators representing the actions to be performed when the robot reaches `position`. | ||
- `ACTION.SHOOT = 0` | ||
- `ACTION.PISTON_SHOOT = 1` | ||
- `ACTION.INTAKE = 2` | ||
- `ACTION.ROLLER = 3` | ||
- `ACTION.EXPAND = 4` | ||
## Known Bugs | ||
- Creating an empty .vauton file doesn't work | ||
- Fix: copy an existing, working .vauton file and rename it |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"position":{"x":49,"y":101,"heading":53,"marginOfError":4.349546658950447},"actions":[0]},{"position":{"x":72,"y":72,"heading":0,"marginOfError":6}},{"position":{"x":83,"y":101,"heading":0,"marginOfError":20.256234283143364}},{"position":{"x":134,"y":58,"heading":97,"marginOfError":9.326487700546172},"actions":[0]}] |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters