Switch between RobotMaps based on RoboRio somehow?

I’m trying to come up with a clever way to switch between RobotMaps based on what RoboRIO your code is initialized on, so you can have a test board with different motor controllers, things on different ports, etc., and a real robot with a different configuration, and the RobotMap set up / initialize different stuff based on it, and flag a constant telling you which board you’re on that you can use elsewhere in your code.

The issue is knowing which board you’re on - I can’t really track down a good way of determining what roboRIO you’re on. The roboRIO runs Linux, so in theory I could SSH into it and find some unique something (the MAC address, a serial number in the CPU, etc.) and use some kind of OS call from Java to get it, our touch a file that includes a “name” on each, and branch off that, but I was curious if anyone has ever done this before / found a simpler way?

There are lots of way’s You definitely could touch a file one one of the rios, and check if it exists a bootup. There should be some Java instructions on how to do this. Another way is if you have an extra DIO, jump the spare dio to ground on one of the boards. Then at bootup if you detect that DIO is low, load the 2nd map.

Ahhhh, the boot up DIO trick is BRILLIANT! :smiley: