liftof_lib/
constants.rs

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
27
28
29
30
31
32

///! Command constants
/// TODO These need to be moved to JSON repr and read from there.
/// Calibration constants

/// TODO This was set randomly
pub const DEFAULT_CALIB_VOLTAGE: u16 = 4269;
/// TODO Not actually sure what we expect here
pub const DEFAULT_CALIB_EXTRA: u8 = 0xFF;
/// Represents "all boards" for RB
pub const DEFAULT_RB_ID: u8 = 0xFF;
/// Represents "all boards" for PB
pub const DEFAULT_PB_ID: u8 = 0xFF;
/// Represents "all boards" for PB
pub const DEFAULT_LTB_ID: u8 = 0xFF;
/// Default LTB CH 0 threshold
pub const DEFAULT_LTB_THRESHOLD_HIT: u16 = 50;
/// Default LTB CH 1 threshold
pub const DEFAULT_LTB_THRESHOLD_BETA: u16 = 50;
/// Default LTB CH 2 threshold
pub const DEFAULT_LTB_THRESHOLD_VETO: u16 = 150;
/// Which kind of run is to be launched by default
pub const DEFAULT_RUN_TYPE: u8 = 0xFF;
/// Number of events to be generated by default
pub const DEFAULT_RUN_EVENT_NO: u8 = 0xFF;
/// Time the run is expected to go on for by default
pub const DEFAULT_RUN_TIME: u8 = 0xFF;

/// Min preamp voltage
pub const PREAMP_MIN_BIAS: i64 = 0;
/// Max preamp voltage
pub const PREAMP_MAX_BIAS: i64 = 68;