-
Notifications
You must be signed in to change notification settings - Fork 61
Accelerometer Implementation [AARD-1924
]
#1234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks to be still under development [build errors & biome checks]
037a126
to
08dd270
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There looks to be a circular dependency issue between SimAI
and SimInput
- when I try to run the dev server I get this issue, and the page doesn't load:
SimAI.ts:62 Uncaught ReferenceError: Cannot access 'SimInput' before initialization
at SimAI.ts:62:37
(anonymous) @ SimAI.ts:62
SimAI.ts:62 Uncaught (in promise) ReferenceError: Cannot access 'SimInput' before initialization
at SimAI.ts:62:37
(anonymous) @ SimAI.ts:62
Finish accelerometer implementation for code simulation.
Jira Ticket
Symptom
The accelerometer (ADXL362) for code simulation wasn't fully implemented last year. Using the built in WPILib accelerometer only returns static data.
Solution
Implemented
Accel
andADXL362
classes usingSimDevice
.Verification
Successfully read values by adding the below code to
simulationPeriodic
in the JavaSampleRobot.java
file. (Didn't add additional sample code, except modified imports, as part of PR though):double accelX = m_Accel.getX(); double accelY = m_Accel.getY(); double accelZ = m_Accel.getZ(); System.out.println(String.format("Accelerometer - X: %.3f g, Y: %.3f g, Z: %.3f g", accelX, accelY, accelZ));
Before merging, ensure the following criteria are met: