-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmisceventcode_string.go
More file actions
41 lines (35 loc) · 1.02 KB
/
misceventcode_string.go
File metadata and controls
41 lines (35 loc) · 1.02 KB
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
// Code generated by "stringer -type=MiscEventCode"; DO NOT EDIT.
package golibevdev
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[MscSerial-0]
_ = x[MscPulseLED-1]
_ = x[MscGesture-2]
_ = x[MscRaw-3]
_ = x[MscScan-4]
_ = x[MscTimestamp-5]
_ = x[MscMax-7]
_ = x[MscCnt-8]
}
const (
_MiscEventCode_name_0 = "MscSerialMscPulseLEDMscGestureMscRawMscScanMscTimestamp"
_MiscEventCode_name_1 = "MscMaxMscCnt"
)
var (
_MiscEventCode_index_0 = [...]uint8{0, 9, 20, 30, 36, 43, 55}
_MiscEventCode_index_1 = [...]uint8{0, 6, 12}
)
func (i MiscEventCode) String() string {
switch {
case i <= 5:
return _MiscEventCode_name_0[_MiscEventCode_index_0[i]:_MiscEventCode_index_0[i+1]]
case 7 <= i && i <= 8:
i -= 7
return _MiscEventCode_name_1[_MiscEventCode_index_1[i]:_MiscEventCode_index_1[i+1]]
default:
return "MiscEventCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}