fix: typo in control of clang-format
[marnav.git] / src / marnav / seatalk / key.hpp
blobd6505fac726e26bae3ae4b0f8ad3ddf4acdb7150
1 #ifndef __SEATALK__KEY__HPP__
2 #define __SEATALK__KEY__HPP__
4 #include <cstdint>
6 namespace marnav
8 namespace seatalk
10 // clang-format off
12 /// Enumeration of all supported keystrokes, regardless of possible
13 /// origin for keystrokes (not all origins can send all keystrokes).
14 ///
15 /// The enumeration also contains all unused codes up to somewhere `0x8f`.
16 ///
17 /// This must be an `enum class` in order to prevent combinations
18 /// of the listed keystrokes, they are not supposed to be combined.
19 ///
20 enum class key : uint8_t {
21 // 0x00
22 key_auto = 0x01, ///< Auto
23 key_standby = 0x02, ///< Standby
24 key_track = 0x03, ///< Track
25 key_disp = 0x04, ///< Disp
26 key_m1 = 0x05, ///< -1
27 key_m10 = 0x06, ///< -10
28 key_p1 = 0x07, ///< +1
29 key_p10 = 0x08, ///< +10
30 key_m1_rg = 0x09, ///< -1 (rudder gain mode)
31 key_p1_rg = 0x0a, ///< +1 (rudder gain mode)
32 // 0x0b
33 // 0x0c
34 // 0x0d
35 // 0x0e
36 // 0x0f
37 // 0x10
38 // 0x10
39 // 0x11
40 // 0x12
41 // 0x13
42 // 0x14
43 // 0x15
44 // 0x16
45 // 0x17
46 // 0x18
47 // 0x19
48 // 0x1a
49 // 0x1b
50 // 0x1c
51 // 0x1d
52 // 0x1e
53 // 0x1f
54 key_p1_m1 = 0x20, ///< +1 & -1
55 key_m1_m10 = 0x21, ///< -1 & -10
56 key_p1_p10 = 0x22, ///< +1 & -10
57 key_standby_auto = 0x23, ///< Standby & Auto
58 // 0x24
59 // 0x25
60 // 0x26
61 // 0x27
62 key_p10_m10 = 0x28, ///< +10 & -10
63 // 0x29,
64 // 0x2a,
65 // 0x2b,
66 // 0x2c,
67 // 0x2d,
68 key_p1_m1_rd = 0x2e, ///< +1 & -1 (Response Display)
69 // 0x2e,
70 // 0x2f,
71 // 0x30,
72 // 0x31,
73 // 0x32,
74 // 0x33,
75 // 0x34,
76 // 0x35,
77 // 0x36,
78 // 0x37,
79 // 0x38,
80 // 0x39,
81 // 0x3a,
82 // 0x3b,
83 // 0x3c,
84 // 0x3d,
85 // 0x3e,
86 // 0x3f,
87 // 0x40,
88 key_auto_long = 0x41, ///< Auto pressed longer
89 key_standby_long = 0x42, ///< Standby pressed longer
90 key_track_long = 0x43, ///< Track pressed longer
91 key_disp_long = 0x44, ///< Disp pressed longer
92 key_m1_long = 0x45, ///< -1 pressed longer
93 key_m10_long = 0x46, ///< -10 pressed longer
94 key_p1_long = 0x47, ///< +1 pressed longer
95 key_p10_long = 0x48, ///< +10 pressed longer
96 // 0x49,
97 // 0x4a,
98 // 0x4b,
99 // 0x4c,
100 // 0x4d,
101 // 0x4e,
102 // 0x4f,
103 // 0x50,
104 // 0x51,
105 // 0x52,
106 // 0x53,
107 // 0x54,
108 // 0x55,
109 // 0x56,
110 // 0x57,
111 // 0x58,
112 // 0x59,
113 // 0x5a,
114 // 0x5b,
115 // 0x5c,
116 // 0x5d,
117 // 0x5e,
118 // 0x5f,
119 key_p1_m1_long = 0x60, ///< +1 & -1 pressed longer
120 key_p1_m10_long = 0x61, ///< -1 & -10 pressed longer
121 key_p1_p10_long = 0x62, ///< +1 & +10 pressed longer
122 key_standby_auto_long = 0x63, ///< Standby & Auto pressed longer (previous wind angle)
123 key_p10_m10_long_s = 0x64, ///< +10 & -10 pressed longer (why not 11 68 97 ?)
124 // 0x65,
125 // 0x66,
126 // 0x67,
127 key_p10_m10_long = 0x68, ///< +10 & -10 pressed longer (in auto mode)
128 // 0x69,
129 // 0x6a,
130 // 0x6b,
131 // 0x6c,
132 // 0x6d,
133 key_p1_m1_long_rg = 0x6e, ///< +1 & -1 pressed longer (Rudder Gain Display)
134 // 0x6f,
135 // 0x70,
136 // 0x71,
137 // 0x72,
138 // 0x73,
139 // 0x74,
140 // 0x75,
141 // 0x76,
142 // 0x77,
143 // 0x78,
144 // 0x79,
145 // 0x7a,
146 // 0x7b,
147 // 0x7c,
148 // 0x7d,
149 // 0x7e,
150 // 0x7f,
151 key_m1_repeat = 0x80, ///< -1 pressed (repeated 1x per second)
152 key_p1_repeat = 0x81, ///< +1 pressed (repeated 1x per second)
153 key_m10_repeat = 0x82, ///< -10 pressed (repeated 1x per second)
154 key_p10_repeat = 0x83, ///< +10 pressed (repeated 1x per second)
155 key_num_release = 0x84, ///< +1, -1, +10 or -10 released
156 // 0x85,
157 // ... and all until 0xff ...
160 // clang-format on
164 #endif