Danny-Dunn / FRC-6978-rio

2 stars 0 forks source link

Autonomous base Code #7

Open Danny-Dunn opened 3 years ago

Danny-Dunn commented 3 years ago

Branch: Autonomous We need to implement two classes, a kernel(interface with robot hardware), and a compute portion(navigation calculations).

Gyro PID is a part of the kernel. Knowing where you are on the graph is part of compute.

Danny-Dunn commented 3 years ago

The Kernel class now has a basic implementation, based on the concept of 'modes' which define how the robot is supposed to behave at any given moment during autonomous.

A mode may have 'parameters' such as a number of degrees to turn, or how far to drive forward.

The mode variable is currently public, but I am planning on making it into a series of functions to change the mode, which will allow for proper setup before a mode begins.