File tree Expand file tree Collapse file tree
lib/src/main/java/com/team2813/lib2813/control/motors Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020/**
2121 * A wrapper around a motor and a PID controller that supports predefined positions.
2222 *
23- * <p>When the motor is created, PID control is disabled. To enable PID control, call {@link
24- * #setSetpoint(P)}; the motor will moving toward the setpoint and maintains position at the
25- * setpoint under the control of the PID controller. To stop the motor, call {@link #stopMotor()}.
23+ * <p>{@code PositionalMotor} supports a dual operation mode:
24+ *
25+ * <ul>
26+ * <li><b>PID Control Mode</b> - the user set a destination position (aka "setpoint") and the
27+ * motor moves towards the setpoint under the control of the PID controller.
28+ * <li><b>Direct User Input Mode</b> - the subsystem responds to direct input from the user (i.e.,
29+ * voltage or duty cycle).
30+ * </ul>
31+ *
32+ * <p>When the motor is created, PID control is disabled. The current mode of the motor can be
33+ * determined by calling {@link #isPIDControlEnabled()}.
34+ *
35+ * <p>To enable <b>PID Control Mode</b> call {@link #setSetpoint(P)}; the motor will move toward the
36+ * setpoint and then maintain position at the setpoint under the control of the PID controller.
37+ *
38+ * <p>The <b>Direct User Input Mode</b> is activated when the user calls the {@link
39+ * #setDemand(ControlMode, double)}. The PID Mode is interrupted and disengaged, and the provided
40+ * demand will be directly sent to the motor.
41+ *
42+ * <p>To stop the motor, call {@link #stopMotor()}.
2643 *
2744 * @param <P> an enum implementing {@link Supplier<Angle>} used to specify setpoints.
2845 */
You can’t perform that action at this time.
0 commit comments