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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! [`ACEvoStartingGrip`] — initial grip conditions at session start.
use ;
/// Initial grip conditions at session start.
///
/// Maps to the `ACEVO_STARTING_GRIP` typedef of the raw protocol.
///
/// # Example
///
/// ```no_run
/// use acevo_shared_memory::{ACEvoSharedMemoryMapper, ACEvoStartingGrip};
///
/// let mapper = ACEvoSharedMemoryMapper::open().unwrap();
/// match mapper.static_data().starting_grip() {
/// ACEvoStartingGrip::Green => println!("Green track — grip builds during the session"),
/// ACEvoStartingGrip::Fast => println!("Track already in advanced grip stage"),
/// ACEvoStartingGrip::Optimum => println!("Track starts at peak grip"),
/// ACEvoStartingGrip::Unknown(v) => println!("Unknown grip condition: {v}"),
/// }
/// ```
///
/// Convert back to the raw protocol integer with [`ACEvoStartingGrip::value`]:
///
/// ```
/// use acevo_shared_memory::ACEvoStartingGrip;
/// assert_eq!(ACEvoStartingGrip::Green.value(), 0);
/// assert_eq!(ACEvoStartingGrip::Fast.value(), 1);
/// assert_eq!(ACEvoStartingGrip::Optimum.value(), 2);
/// assert_eq!(ACEvoStartingGrip::from(2), ACEvoStartingGrip::Optimum);
/// ```