ev3dev_lang_rust/motors/
medium_motor.rs

1use super::MotorPort;
2use crate::{wait, Attribute, Device, Driver, Ev3Error, Ev3Result};
3use std::time::Duration;
4
5/// EV3 medium servo motor
6#[derive(Debug, Clone, Device)]
7pub struct MediumMotor {
8    driver: Driver,
9}
10
11impl MediumMotor {
12    fn new(driver: Driver) -> Self {
13        Self { driver }
14    }
15
16    findable!(
17        "tacho-motor",
18        ["lego-ev3-m-motor"],
19        MotorPort,
20        "MediumMotor",
21        "out"
22    );
23    tacho_motor!();
24}