Programming Snippets (FIRST AGE 2026)
Keep snippets small, tested, and documented. Each entry should include: what it solves, code, parameters to tune, how to test, and pitfalls.
Disclaimer: These snippets are WIP and untested in 2026 hardware; treat them as starting points and validate on-robot. They are custom patterns built on WPILib APIs (not official WPILib sample code).
Snippet menu
- Hub Shift Timer
- Indexer: Hoard/Burst
- Climb Command
- Auto Chooser
- Brownout Guard
- Telemetry Publisher
- AprilTag Pose + Aim Assist
- FMS Hub State Reader
- Intake + Shooter Control
- Path/Auto Template
- Driver Feedback Cues
- Command Timeout Helper
- Current Limits and Ramps
- Vision/Odometry Fusion
- DriveSubsystem Skeleton
- Gyro + Field Orientation Helper
- Logger Hook
- Motor Safety Wrapper
- LED Status
- Odometry Helper (No Vision)
- Shooter Interpolation Table
- Safe Shot Sequencer
- Hopper Capacity Detector
- Shift-Aware Path Switch
- Climb Interlock + Precheck
- Stow/Deploy Coordination
- Auto Taxi + Stash
- LED Enriched Status
Add more as we harden code; keep language consistent with robot codebase (WPILib Java assumed here).