kernelvex 0.1.2

VEX Controls library
Documentation
/// Represents the orientation or direction of a tracking wheel or component.
///
/// Used to indicate the mounting direction and rotation sense of tracking wheels
/// and other directional components in the robot system.

use vexide_devices::smart::PortError;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Orientation {
    /// Left orientation
    Left,
    /// Right orientation
    Right,
    /// Clockwise rotation
    CW,
    /// Counter-clockwise rotation
    CCW,
}

#[macro_export]
macro_rules! shared_motor {
    ($($motor:expr),+ $(,)?) => {{
        const N: usize = <[()]>::len(&[$(shared_motor!(@replace $motor)),*]);
        
        let motors: [Motor; N] = [$($motor),+];
        Rc::new(RefCell::new(motors))
    }};
    (@replace $_:expr) => (());
}

pub type GroupErrors = Vec<PortError>;