added docs comments for new method
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user