1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use super::MotorPort;
#[cfg(target_os = "linux")]
use crate::wait;
use crate::{Attribute, Device, Driver, Ev3Error, Ev3Result};
use std::time::Duration;

/// EV3 medium servo motor
#[derive(Debug, Clone, Device)]
pub struct MediumMotor {
    driver: Driver,
}

impl MediumMotor {
    fn new(driver: Driver) -> Self {
        Self { driver }
    }

    findable!(
        "tacho-motor",
        ["lego-ev3-m-motor"],
        MotorPort,
        "MediumMotor",
        "out"
    );
    tacho_motor!();
}