mirror of https://bitbucket.org/ausocean/av.git
revid/config/config.go: Made string a const, removed redundant == true
This commit is contained in:
parent
442ad27e98
commit
1f8ef44216
|
@ -118,6 +118,9 @@ const (
|
|||
FilterKNN
|
||||
)
|
||||
|
||||
// OS names
|
||||
const raspian = "Raspbian GNU/Linux"
|
||||
|
||||
// Config provides parameters relevant to a revid instance. A new config must
|
||||
// be passed to the constructor. Default values for these fields are defined
|
||||
// as consts above.
|
||||
|
@ -449,12 +452,12 @@ func (c *Config) Validate() error {
|
|||
c.PSITime = defaultPSITime
|
||||
}
|
||||
|
||||
if c.ShowWindows == true {
|
||||
if c.ShowWindows {
|
||||
os, err := osName()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if os == "Raspbian GNU/Linux" {
|
||||
if os == raspian {
|
||||
c.Logger.Log(logger.Info, "ShowWindows disabled on Raspbian GNU/Linux")
|
||||
c.ShowWindows = false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue