RobotCasserole1736 / RobotCasserole2024

Main 2024 Robot Code for FRC Team 1736 Robot Casserole
https://robotcasserole.org
MIT License
1 stars 1 forks source link

Add ability to configure things differently based on which bot we're on #49

Closed gerth2 closed 7 months ago

gerth2 commented 7 months ago

as we're likely going to have two robots almost ready to go soon, I think we're gonna want some utility to pick between two values (ints/floats/booleans/?) based on whether we're on the practice bot or on the pretty bot (Do we have vocab for this yet?)

https://robotpy.readthedocs.io/projects/wpilib/en/stable/wpilib/RobotController.html#wpilib.RobotController.getSerialNumber - here's the latest and greatest recommended way to go about doing this, read the serial number.

Probably just needs to be a single function somewhere in utilties that takes two argumetns, and returns one of the two based on serial number.

Be sure to handle the "none-of-the-above" case reasonably.