Accelerometer Implementation [`AARD-1924`]
Finish accelerometer implementation for code simulation.
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 and ADXL362 classes using SimDevice.
Verification
Successfully read values by adding the below code to simulationPeriodic in the JavaSample Robot.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:
- [ ] All acceptance criteria outlined in the ticket are met.
- [ ] Necessary test cases have been added and updated.
- [ ] A feature toggle or safe disable path has been added (if applicable).
- [ ] User-facing polish:
- Ask: "Is this ready-looking?"
- [ ] Cross-linking between Jira and GitHub:
- PR links to the relevant Jira issue.
- Jira ticket has a comment referencing this PR.