mirror of https://bitbucket.org/ausocean/av.git
revid: fixed build errors
This commit is contained in:
parent
056f3b75b3
commit
39a7b382f6
|
@ -132,7 +132,7 @@ func handleFlags() revid.Config {
|
||||||
brightnessPtr = flag.Uint("Brightness", 50, "Set brightness. (0-100) ")
|
brightnessPtr = flag.Uint("Brightness", 50, "Set brightness. (0-100) ")
|
||||||
saturationPtr = flag.Int("Saturation", 0, "Set Saturation. (100-100)")
|
saturationPtr = flag.Int("Saturation", 0, "Set Saturation. (100-100)")
|
||||||
exposurePtr = flag.String("Exposure", "auto", "Set exposure mode. ("+strings.Join(revid.ExposureModes[:], ",")+")")
|
exposurePtr = flag.String("Exposure", "auto", "Set exposure mode. ("+strings.Join(revid.ExposureModes[:], ",")+")")
|
||||||
autoWhiteBalancePtr = flag.String("Awb", "auto", "Set automatic white balance mode. ("+strings.Join(revid.AwbModes[:], ",")+")")
|
autoWhiteBalancePtr = flag.String("Awb", "auto", "Set automatic white balance mode. ("+strings.Join(revid.AutoWhiteBalanceModes[:], ",")+")")
|
||||||
)
|
)
|
||||||
|
|
||||||
var outputs flagStrings
|
var outputs flagStrings
|
||||||
|
@ -263,7 +263,7 @@ func handleFlags() revid.Config {
|
||||||
cfg.Brightness = *brightnessPtr
|
cfg.Brightness = *brightnessPtr
|
||||||
cfg.Saturation = *saturationPtr
|
cfg.Saturation = *saturationPtr
|
||||||
cfg.Exposure = *exposurePtr
|
cfg.Exposure = *exposurePtr
|
||||||
cfg.Awb = *autoWhiteBalancePtr
|
cfg.AutoWhiteBalance = *autoWhiteBalancePtr
|
||||||
|
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
|
@ -304,7 +304,7 @@ func (c *Config) Validate(r *Revid) error {
|
||||||
return errors.New("bad exposure setting in config")
|
return errors.New("bad exposure setting in config")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !stringInSlice(c.Awb, AwbModes[:]) {
|
if !stringInSlice(c.AutoWhiteBalance, AutoWhiteBalanceModes[:]) {
|
||||||
return errors.New("bad awb setting in config")
|
return errors.New("bad awb setting in config")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -373,7 +373,7 @@ func (r *Revid) Update(vars map[string]string) error {
|
||||||
case "Exposure":
|
case "Exposure":
|
||||||
r.config.Exposure = value
|
r.config.Exposure = value
|
||||||
case "Awb":
|
case "Awb":
|
||||||
r.config.Awb = value
|
r.config.AutoWhiteBalance = value
|
||||||
case "Output":
|
case "Output":
|
||||||
outputs := strings.Split(value, ",")
|
outputs := strings.Split(value, ",")
|
||||||
r.config.Outputs = make([]uint8, len(outputs))
|
r.config.Outputs = make([]uint8, len(outputs))
|
||||||
|
@ -613,7 +613,7 @@ func (r *Revid) startRaspivid() error {
|
||||||
"--brightness", fmt.Sprint(r.config.Brightness),
|
"--brightness", fmt.Sprint(r.config.Brightness),
|
||||||
"--saturation", fmt.Sprint(r.config.Saturation),
|
"--saturation", fmt.Sprint(r.config.Saturation),
|
||||||
"--exposure", fmt.Sprint(r.config.Exposure),
|
"--exposure", fmt.Sprint(r.config.Exposure),
|
||||||
"--awb", fmt.Sprint(r.config.Awb),
|
"--awb", fmt.Sprint(r.config.AutoWhiteBalance),
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.config.FlipHorizontal {
|
if r.config.FlipHorizontal {
|
||||||
|
|
Loading…
Reference in New Issue