wpilibsuite / wpilibsuite/SystemcoreTesting
Simulation does not crash on double-allocated SmartIO
Open
Nobody has claimed this yet.
Not Implemented Yet
WPILib
- Dominant language
- Java
- Stars
- 186
- Forks
- 24
- Avg merge
- 8h 27m
- Merged PRs (30d)
- 9
Description
MRE:
public class Robot extends TimedRobot {
/**
* This function is run when the robot is first started up and should be used for any
* initialization code.
*/
public Robot() {
var in0 = new PWMSparkMax(0);
var alsoIn0 = new DigitalInput(0);
}
}
This code will crash on a systemcore (as expected), but runs fine in simulation.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Java Robot constructor in the MRE and trace how PWMSparkMax(0) and DigitalInput(0) are handled in simulation versus on a systemcore. Reproduce the example in simulation and compare its allocation behavior with the expected crash for a double-allocated SmartIO.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- embedded-iot, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100