Introduce configurable buffer size

This commit is contained in:
Jan Dittberner 2020-04-20 22:01:06 +02:00
parent 9924771531
commit 0bb19ba8bd
4 changed files with 23 additions and 5 deletions

View file

@ -11,6 +11,7 @@ import (
type ClientConfig struct {
SerialAddress string `yaml:"serial_address"`
BaudRate int `yaml:"serial_baudrate"`
BufferSize uint16 `yaml:"serial_buffer_size"`
Paranoid bool `yaml:"paranoid"`
Debug bool `yaml:"debug"`
GNUPGBinary string `yaml:"gnupg_bin"`
@ -21,6 +22,7 @@ type ClientConfig struct {
var defaultConfig = ClientConfig{
SerialAddress: "/dev/ttyUSB0",
BaudRate: 115200,
BufferSize: 2048,
Paranoid: false,
Debug: false,
OpenSSLBinary: "/usr/bin/openssl",