Flash3388 / FlashFRC

FRC Plugin for FlashLib
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Support for FRC simulation #11

Open tomtzook opened 2 years ago

tomtzook commented 2 years ago

Currently, wpilib docs shows using the simulation while mixing real and simulated only code parts and using if checks (i.e. isReal isSimulation). This isn't really comfortable, so look for some way to separate (into classes or something).

tomtzook commented 2 years ago

Basically, in simulation mode we use most of the electronics the same. BUT because there is no real-world feedback, we must add some code which provides that. WPILib supplies a number of classes that are capable of doing the calculation necessary to simulate parts of the robot, but we must declare which to use and connect them all.

If you look at examples from WPILib (see links bellow), you'll notice how mixed the simulation and real robot codes are. This is a problem for 2 reasons:

Our integration for the most part needs to address those problems. However, some parts of the robot may need complete replacement, like HidInterface. So that's a different thing, but should be simple thanks to the abstraction of FlashLib.

Our steps will be:

Take a look at some stuff:

tomtzook commented 2 years ago

Maybe make it into a project for the programming team.

It will be a good way to learn more about WPILib, about FlashLib and about code design.

@guyws @yaronkle