add lograw option

This commit is contained in:
w1ndyb0y
2020-12-21 16:18:22 +08:00
parent 481870cea9
commit 92a10cd4e6
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ var (
device string
baudrate int
bytesize byte
lograw bool
dbFile string
dbInit bool
@@ -86,13 +87,13 @@ func initConfig() {
viper.AutomaticEnv() // read in environment variables that match
// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
fmt.Println("Using config file:", viper.ConfigFileUsed())
device = viper.GetString("serial.device")
baudrate = viper.GetInt("serial.baudrate")
bytesize = byte(viper.GetInt("serial.bytesize"))
lograw = viper.GetBool("serial.lograw")
dbFile = viper.GetString("sqlite.file")
dbInit = viper.GetBool("sqlite.init")
}
+1
View File
@@ -2,6 +2,7 @@ serial:
device: ttyS1
baudrate: 9600
bytesize: 7
lograw: true
sqlite: