-
Notifications
You must be signed in to change notification settings - Fork 9
/
expostureType.go
68 lines (64 loc) · 1.72 KB
/
expostureType.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
59
60
61
62
63
64
65
66
67
68
//Copyright (c) 2017, Technomancers. All rights reserved.
//Use of this source code is governed by a BSD-style
//license that can be found in the LICENSE file.
package piCamera
//ExposureType is for setting the exposure mode.
type ExposureType int
const (
//ExpNone is used to tell this package to use whatever the default is.
ExpNone ExposureType = iota
//ExpAuto use automatic exposure mode
ExpAuto
//ExpNight select setting for night shooting
ExpNight
//ExpBacklight select setting for backlit subject
ExpBacklight
//ExpSpotlight select setting for spotlit subject
ExpSpotlight
//ExpSports select setting for sports
ExpSports
//ExpSnow select setting optimised for snowy scenery
ExpSnow
//ExpBeach select setting optimised for beach
ExpBeach
//ExpVerylong select setting for long exposures
ExpVerylong
//ExpFixedfps constrain fps to a fixed value
ExpFixedfps
//ExpAntishake turns on antishake mode
ExpAntishake
//ExpFireworks select setting optimised for fireworks
ExpFireworks
)
//Convert takes the type and returns the string representation of that value.
//Returns true as well if it is the default value.
func (t ExposureType) Convert() (string, bool) { //nolint: gocyclo
switch t {
case ExpAuto:
return "auto", false
case ExpNight:
return "night", false
case ExpBacklight:
return "backlight", false
case ExpSpotlight:
return "spotlight", false
case ExpSports:
return "sports", false
case ExpSnow:
return "snow", false
case ExpBeach:
return "beach", false
case ExpVerylong:
return "verylong", false
case ExpFixedfps:
return "fixedfps", false
case ExpAntishake:
return "antishake", false
case ExpFireworks:
return "fireworks", false
case ExpNone:
fallthrough
default:
return "", true
}
}