Skip to content

Commit

Permalink
Merge branch 'safe-mode' of https://github.com/DeepBlueRobotics/Robot…
Browse files Browse the repository at this point in the history
…Code2023 into safe-mode
  • Loading branch information
FriedLongJohns committed Oct 1, 2023
2 parents 88cace6 + d6b8515 commit 87c5866
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 55 deletions.
23 changes: 0 additions & 23 deletions .devcontainer/Dockerfile

This file was deleted.

47 changes: 20 additions & 27 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,39 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
"name": "Java",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update the VARIANT arg to pick a Java version: 11, 17
// Append -bullseye or -buster to pin to an OS version.
// Use the -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "17-bullseye",
// Options
"INSTALL_MAVEN": "false",
"INSTALL_GRADLE": "false",
"NODE_VERSION": "lts/*"
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:1-17-bookworm",

"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "false",
"installGradle": "true"
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "",

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vscjava.vscode-java-pack",
"redhat.java",
"ms-vscode.cpptools",
"vcjava.vscode-java-debug",
"ms-toolsai.jupyter",
"vcjava.vscode-java-dependency",
"wpilibsuite.vscode-wpilib"
"vcjava.vscode-java-dependency"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",
"postAttachCommand": "./.devcontainer/installWPILibExtension.sh && exit"

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
7 changes: 7 additions & 0 deletions .devcontainer/installWPILibExtension.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Modified from ChatGPT suggestions
WPILIB_VSIX_URL=$(curl -s "https://api.github.com/repos/wpilibsuite/vscode-wpilib/releases/latest" | jq -r '.assets[] | select(.name | test(".vsix$")) | .browser_download_url')
INSTALL_LOCATION="/tmp/wpilib-extension/latest.vsix"
echo "$WPILIB_VSIX_URL"
curl --create-dirs -L -o "$INSTALL_LOCATION" "$WPILIB_VSIX_URL"
code --install-extension "$INSTALL_LOCATION"

11 changes: 6 additions & 5 deletions src/main/java/org/carlmontrobotics/robotcode2023/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public final class Constants {
public static final class Drivetrain {

//#region Subsystem Constants

public static final double wheelBase = Units.inchesToMeters(19.75);
public static final double trackWidth = Units.inchesToMeters(28.75);
// "swerveRadius" is the distance from the center of the robot to one of the modules
Expand All @@ -51,10 +51,10 @@ public static final class Drivetrain {
public static final double maxStrafe = maxSpeed;
// seconds it takes to go from 0 to 12 volts(aka MAX)
public static final double secsPer12Volts = 0.1;




// maxRCW is the angular velocity of the robot.
// Calculated by looking at one of the motors and treating it as a point mass moving around in a circle.
// Tangential speed of this point mass is maxSpeed and the radius of the circle is sqrt((wheelBase/2)^2 + (trackWidth/2)^2)
Expand Down Expand Up @@ -380,6 +380,7 @@ public static final class Roller {
//#endregion

//#region Command Constants

//#endregion

public static enum GameObject {
Expand Down

0 comments on commit 87c5866

Please sign in to comment.