Skip to content

Refactor to make all classes integrate more smoothly #9

@Tullysaurus

Description

@Tullysaurus

Things like flywheel pairs dont work when you put them into a position manager, position managers have to be created every time you want to use one (rather than just initializing them then calling a method on them to set the target value).

Basically we should refactor to make everything work together more smoothly, heres a list of the proposed changes:

*When I say Motor I mean MotorWrappers

  1. Remove FlywheelPair and replace it with a class called "MotorSystem" or something that takes a list of motors as input and controls them all together (would be useful if for some reason we need 3 or more motors spinning in sync).

  2. BrakelessReset should be integrated into Motors*/MotorSystems, there isnt really a point for it to be its own class.

  3. MotorBulkActions should be build into MotorSystem.

  4. PositionManager should be a part of Motors*/MotorSystems by default, and should be configurable then callable.

  5. Motors* should have the ability to add a Pigeon2 sensor (I'm pretty sure this already exists in PositionManager) to more accurately determine their angle, and .getPosition() on a Motor* should return some combination of the sensors readings + the motors readings).

  6. There should be the ability to add gear ratios to Motors*.

  7. NetworkTablesUtil needs to be able to put any type into the networktable.

  8. NetworkTablesUtil should have a .get method to get the values from the network table.

  9. Add a new class for Pigeon2 objects like "PigeonWrapper" that would be used in the Motors* PositionManager.

If we use questnav, we should have some code that automatically handles most of that too.

The end goal here is to pretty much make it where we never really have to interact with the actual hardware systems and instead use this library to more easily interact with them.

If you have any ideas for this or any changes you want to make, please send them here.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions