added docs comments for new method

This commit is contained in:
2026-06-12 19:08:07 -05:00
parent 8631d9d2a1
commit 58eb647507
+2
View File
@@ -40,6 +40,8 @@ impl<T: motor::Driver + motor::Sensor> Controller<T> {
.set_speed_and_direction(motor_command, self.current_direction); .set_speed_and_direction(motor_command, self.current_direction);
} }
///Creates a new Controller with a motor (of type T), a max speed and a pid::Config
/// This then allows for you to use the controller with the provided types
pub fn new(motor: T, max_speed: Speed, config: pid::Config) -> Self { pub fn new(motor: T, max_speed: Speed, config: pid::Config) -> Self {
Controller { Controller {
motor: motor, motor: motor,