-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstrings.go
58 lines (44 loc) · 1.66 KB
/
strings.go
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
// Code generated by "stringer -type Mode,Filter,StandByTime,Oversampling -output strings.go"; DO NOT EDIT.
package bme280
import "strconv"
const (
_Mode_name_0 = "ModeSleepModeForced"
_Mode_name_1 = "ModeNormal"
)
var (
_Mode_index_0 = [...]uint8{0, 9, 19}
)
func (i Mode) String() string {
switch {
case 0 <= i && i <= 1:
return _Mode_name_0[_Mode_index_0[i]:_Mode_index_0[i+1]]
case i == 3:
return _Mode_name_1
default:
return "Mode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}
const _Filter_name = "FilterOffFilter2Filter4Filter8Filter16"
var _Filter_index = [...]uint8{0, 9, 16, 23, 30, 38}
func (i Filter) String() string {
if i >= Filter(len(_Filter_index)-1) {
return "Filter(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Filter_name[_Filter_index[i]:_Filter_index[i+1]]
}
const _StandByTime_name = "StandByTime1msStandByTime62_5msStandByTime125msStandByTime250msStandByTime500msStandByTime1000msStandByTime10msStandByTime20ms"
var _StandByTime_index = [...]uint8{0, 14, 31, 47, 63, 79, 96, 111, 126}
func (i StandByTime) String() string {
if i >= StandByTime(len(_StandByTime_index)-1) {
return "StandByTime(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _StandByTime_name[_StandByTime_index[i]:_StandByTime_index[i+1]]
}
const _Oversampling_name = "OversamplingOffOversampling1xOversampling2xOversampling4xOversampling8xOversampling16x"
var _Oversampling_index = [...]uint8{0, 15, 29, 43, 57, 71, 86}
func (i Oversampling) String() string {
if i >= Oversampling(len(_Oversampling_index)-1) {
return "Oversampling(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Oversampling_name[_Oversampling_index[i]:_Oversampling_index[i+1]]
}