Code
Overview
Custom Motor Controller Classes
Target Based
Supply a motor with a power and sensitivity
Target up or target down (can be bound to buttons or sticks)
Will hold its position
Power Based
Supply a motor a power
Will not hold its position - Too heavy for the structural position
Custom Configuration File
All servos and motors can be configured in one file
Changing a motor in the configuration file changes them in all of the files
Motors and servos can be individually disabled in the configuration file without changing any of the code
Motors and servos can be reversed (swap their forwards direction) in the configuration file
Process
Minimize Redundancy Approach
Config file created first to allow other classes to be designed around it
Motor controller classes designed to use config file
Op mode classes designed to use motor controller classes
Changing the config file updates all of the op modes with minimal to no changes
Changing the motor controller updates all of the op modes with minimal to no changes