-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforceeventcode_string.go
More file actions
54 lines (48 loc) · 1.5 KB
/
Copy pathforceeventcode_string.go
File metadata and controls
54 lines (48 loc) · 1.5 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
42
43
44
45
46
47
48
49
50
51
52
53
54
// Code generated by "stringer -type=ForceEventCode"; 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[FfRumble-80]
_ = x[FfPeriodic-81]
_ = x[FfConstant-82]
_ = x[FfSpring-83]
_ = x[FfFriction-84]
_ = x[FfDamper-85]
_ = x[FfInertia-86]
_ = x[FfRamp-87]
_ = x[FfSawtoothUp-88]
_ = x[FfSawtoothDown-89]
_ = x[FfCustom-90]
_ = x[FfGain-96]
_ = x[FfAutoCenter-97]
_ = x[FfMax-127]
_ = x[FfCnt-128]
}
const (
_ForceEventCode_name_0 = "FfRumbleFfPeriodicFfConstantFfSpringFfFrictionFfDamperFfInertiaFfRampFfSawtoothUpFfSawtoothDownFfCustom"
_ForceEventCode_name_1 = "FfGainFfAutoCenter"
_ForceEventCode_name_2 = "FfMaxFfCnt"
)
var (
_ForceEventCode_index_0 = [...]uint8{0, 8, 18, 28, 36, 46, 54, 63, 69, 81, 95, 103}
_ForceEventCode_index_1 = [...]uint8{0, 6, 18}
_ForceEventCode_index_2 = [...]uint8{0, 5, 10}
)
func (i ForceEventCode) String() string {
switch {
case 80 <= i && i <= 90:
i -= 80
return _ForceEventCode_name_0[_ForceEventCode_index_0[i]:_ForceEventCode_index_0[i+1]]
case 96 <= i && i <= 97:
i -= 96
return _ForceEventCode_name_1[_ForceEventCode_index_1[i]:_ForceEventCode_index_1[i+1]]
case 127 <= i && i <= 128:
i -= 127
return _ForceEventCode_name_2[_ForceEventCode_index_2[i]:_ForceEventCode_index_2[i+1]]
default:
return "ForceEventCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}