From cbc9033050b4a2043c02ae836b08649b2bc04cf9 Mon Sep 17 00:00:00 2001 From: HunterBarclay Date: Fri, 11 Oct 2024 10:58:04 -0600 Subject: [PATCH] chore: Format and cleanup --- .../src/systems/simulation/wpilib_brain/SimInput.ts | 4 ++-- .../systems/simulation/wpilib_brain/SimOutput.ts | 2 +- .../systems/simulation/wpilib_brain/WPILibBrain.ts | 2 +- fission/src/ui/panels/WSViewPanel.tsx | 6 ++++-- simulation/samples/CppSample/.gitignore | 2 ++ .../.settings/org.eclipse.buildship.core.prefs | 13 ------------- 6 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 simulation/samples/CppSample/.settings/org.eclipse.buildship.core.prefs diff --git a/fission/src/systems/simulation/wpilib_brain/SimInput.ts b/fission/src/systems/simulation/wpilib_brain/SimInput.ts index 637520a316..b4776f03a3 100644 --- a/fission/src/systems/simulation/wpilib_brain/SimInput.ts +++ b/fission/src/systems/simulation/wpilib_brain/SimInput.ts @@ -5,7 +5,7 @@ import Mechanism from "@/systems/physics/Mechanism" import Jolt from "@barclah/jolt-physics" import JOLT from "@/util/loading/JoltSyncLoader" import { JoltQuat_ThreeQuaternion, JoltVec3_ThreeVector3 } from "@/util/TypeConversions" -import * as THREE from 'three' +import * as THREE from "three" export abstract class SimInput { constructor(protected _device: string) {} @@ -101,7 +101,7 @@ export class SimAccelInput extends SimInput { super(device) this._robot = robot this._joltID = this._robot.nodeToBody.get(this._robot.rootBody) - this._prevVel = new THREE.Vector3(0,0,0) + this._prevVel = new THREE.Vector3(0, 0, 0) } public Update(deltaT: number) { diff --git a/fission/src/systems/simulation/wpilib_brain/SimOutput.ts b/fission/src/systems/simulation/wpilib_brain/SimOutput.ts index cefef5bf5d..04e9205c7c 100644 --- a/fission/src/systems/simulation/wpilib_brain/SimOutput.ts +++ b/fission/src/systems/simulation/wpilib_brain/SimOutput.ts @@ -61,7 +61,7 @@ export class CANOutputGroup extends SimOutputGroup { const average = this.ports.reduce((sum, port) => { const device = SimCAN.GetDeviceWithID(port, SimType.CANMotor) - return sum + (device?.get(" { diff --git a/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts b/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts index bce82be75d..e0bd2779d9 100644 --- a/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts +++ b/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts @@ -379,7 +379,7 @@ class WPILibBrain extends Brain { return } - // this.addSimInput(new SimGyroInput("Test Gyro[1]", mechanism)) + this.addSimInput(new SimGyroInput("Test Gyro[1]", mechanism)) this.addSimInput(new SimAccelInput("ADXL362[4]", mechanism)) this.addSimInput(new SimDigitalInput("SYN DI[0]", () => Math.random() > 0.5)) this.addSimOutput(new SimDigitalOutput("SYN DO[1]")) diff --git a/fission/src/ui/panels/WSViewPanel.tsx b/fission/src/ui/panels/WSViewPanel.tsx index e109c48382..693db7c25c 100644 --- a/fission/src/ui/panels/WSViewPanel.tsx +++ b/fission/src/ui/panels/WSViewPanel.tsx @@ -97,7 +97,7 @@ function setGeneric(simType: SimType, device: string, field: string, value: stri const WSViewPanel: React.FC = ({ panelId }) => { // const [tb, setTb] = useState(generateTableBody()) - const [table, updateTable] = useReducer((_) => generateTableBody(), generateTableBody()) + const [table, updateTable] = useReducer(_ => generateTableBody(), generateTableBody()) const [selectedType, setSelectedType] = useState() const [selectedDevice, setSelectedDevice] = useState() @@ -118,7 +118,9 @@ const WSViewPanel: React.FC = ({ panelId }) => { }, [selectedType]) useEffect(() => { - const func = () => { updateTable() } + const func = () => { + updateTable() + } const id: NodeJS.Timeout = setInterval(func, TABLE_UPDATE_INTERVAL) return () => { diff --git a/simulation/samples/CppSample/.gitignore b/simulation/samples/CppSample/.gitignore index 11c9fdd738..bae79ccf97 100644 --- a/simulation/samples/CppSample/.gitignore +++ b/simulation/samples/CppSample/.gitignore @@ -2,3 +2,5 @@ .vscode/ .wpilib/ build/ +.settings/ + diff --git a/simulation/samples/CppSample/.settings/org.eclipse.buildship.core.prefs b/simulation/samples/CppSample/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index bc1ff1181e..0000000000 --- a/simulation/samples/CppSample/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,13 +0,0 @@ -arguments=--init-script /Users/colbura/cache/jdtls/config/org.eclipse.osgi/55/0/.cp/gradle/init/init.gradle -auto.sync=false -build.scans.enabled=false -connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) -connection.project.dir= -eclipse.preferences.version=1 -gradle.user.home= -java.home=/opt/homebrew/Cellar/openjdk/22.0.2/libexec/openjdk.jdk/Contents/Home -jvm.arguments= -offline.mode=false -override.workspace.settings=true -show.console.view=true -show.executions.view=true