autd3-core 38.1.0

AUTD3 core traits and types
Documentation
mod angle;
mod freq;

use core::time::Duration;

pub use core::f32::consts::PI;

#[cfg(feature = "use_meter")]
mod unit {
    /// meter
    pub const METER: f32 = 1.0;
}
#[cfg(not(feature = "use_meter"))]
mod unit {
    /// meter
    pub const METER: f32 = 1000.0;
}
pub use unit::*;

pub use angle::*;
pub use freq::*;

/// millimeter
pub const MILLIMETER: f32 = METER / 1000.0;

/// The absolute threshold of hearing in \[㎩\]
pub const ABSOLUTE_THRESHOLD_OF_HEARING: f32 = 20e-6;

/// The amplitude of T4010A1 in \[㎩*mm\]
pub const T4010A1_AMPLITUDE: f32 = 275.574_25 * 200.0 * MILLIMETER; // [㎩*mm]

/// The default timeout duration
pub const DEFAULT_TIMEOUT: core::time::Duration = core::time::Duration::from_millis(200);

/// The frequency of ultrasound
pub const ULTRASOUND_FREQ: Freq<u32> = Freq { freq: 40000 };

/// The period of ultrasound
pub const ULTRASOUND_PERIOD: Duration = Duration::from_micros(25);

#[doc(hidden)]
pub const SILENCER_STEPS_INTENSITY_DEFAULT: u16 = 10;
#[doc(hidden)]
pub const SILENCER_STEPS_PHASE_DEFAULT: u16 = 40;

/// \[㎜\]
#[allow(non_upper_case_globals)]
pub const mm: f32 = MILLIMETER;