diff --git a/cmd/revid-cli/main.go b/cmd/revid-cli/main.go index ea80ef40..af87b38e 100644 --- a/cmd/revid-cli/main.go +++ b/cmd/revid-cli/main.go @@ -132,7 +132,7 @@ func handleFlags() revid.Config { brightnessPtr = flag.Uint("Brightness", 50, "Set brightness. (0-100) ") saturationPtr = flag.Int("Saturation", 0, "Set Saturation. (100-100)") 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 @@ -263,7 +263,7 @@ func handleFlags() revid.Config { cfg.Brightness = *brightnessPtr cfg.Saturation = *saturationPtr cfg.Exposure = *exposurePtr - cfg.Awb = *autoWhiteBalancePtr + cfg.AutoWhiteBalance = *autoWhiteBalancePtr return cfg } diff --git a/revid/config.go b/revid/config.go index 216bda42..209e692c 100644 --- a/revid/config.go +++ b/revid/config.go @@ -304,7 +304,7 @@ func (c *Config) Validate(r *Revid) error { 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") } diff --git a/revid/revid.go b/revid/revid.go index cb04733d..950bc0fa 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -373,7 +373,7 @@ func (r *Revid) Update(vars map[string]string) error { case "Exposure": r.config.Exposure = value case "Awb": - r.config.Awb = value + r.config.AutoWhiteBalance = value case "Output": outputs := strings.Split(value, ",") r.config.Outputs = make([]uint8, len(outputs)) @@ -613,7 +613,7 @@ func (r *Revid) startRaspivid() error { "--brightness", fmt.Sprint(r.config.Brightness), "--saturation", fmt.Sprint(r.config.Saturation), "--exposure", fmt.Sprint(r.config.Exposure), - "--awb", fmt.Sprint(r.config.Awb), + "--awb", fmt.Sprint(r.config.AutoWhiteBalance), } if r.config.FlipHorizontal {