autd3_core/defined/
mod.rs1mod angle;
2mod freq;
3
4use std::time::Duration;
5
6pub use std::f32::consts::PI;
7
8#[cfg(feature = "use_meter")]
9mod unit {
10 pub const METER: f32 = 1.0;
12}
13#[cfg(not(feature = "use_meter"))]
14mod unit {
15 pub const METER: f32 = 1000.0;
17}
18pub use unit::*;
19
20pub use angle::*;
21pub use freq::*;
22
23pub const MILLIMETER: f32 = METER / 1000.0;
25
26pub const ABSOLUTE_THRESHOLD_OF_HEARING: f32 = 20e-6;
28
29pub const T4010A1_AMPLITUDE: f32 = 275.574_25 * 200.0 * MILLIMETER; pub const DEFAULT_TIMEOUT: std::time::Duration = std::time::Duration::from_millis(200);
34
35pub const ULTRASOUND_FREQ: Freq<u32> = Freq { freq: 40000 };
37
38pub const ULTRASOUND_PERIOD: Duration = Duration::from_micros(25);
40
41pub const ULTRASOUND_PERIOD_COUNT_BITS: usize = 9;
43
44pub const ULTRASOUND_PERIOD_COUNT: usize = 1 << ULTRASOUND_PERIOD_COUNT_BITS;
46
47#[allow(non_upper_case_globals)]
49pub const mm: f32 = MILLIMETER;