0.1.1-test
reduce test speed on com-ports to 4800 and 115200 reduce timeouts to 220ms on com and 300 on net added actual comments to drivers
This commit is contained in:
4
main.go
4
main.go
@@ -15,8 +15,8 @@ import (
|
||||
const (
|
||||
configFileName = "connect.json"
|
||||
outputDir = "date"
|
||||
comSearchTimeout = 500 * time.Millisecond
|
||||
tcpSearchTimeout = 2 * time.Second
|
||||
comSearchTimeout = 220 * time.Millisecond
|
||||
tcpSearchTimeout = 300 * time.Millisecond
|
||||
)
|
||||
|
||||
// ConfigFile соответствует структуре файла connect.json
|
||||
|
||||
@@ -452,15 +452,12 @@ func findOnComPort(portName string, timeout time.Duration) (*Config, error) {
|
||||
}
|
||||
|
||||
// Стандартные скорости обмена для ККТ
|
||||
baudRates := []int32{115200, 57600, 38400, 19200, 9600}
|
||||
baudRates := []int32{115200, 4800}
|
||||
// В документации BaudRate - это индекс от 0 до 6.
|
||||
// 6 = 115200, 5 = 57600, 4 = 38400, 3 = 19200, 2 = 9600
|
||||
baudRateIndexes := map[int32]int32{
|
||||
115200: 6,
|
||||
57600: 5,
|
||||
38400: 4,
|
||||
19200: 3,
|
||||
9600: 2,
|
||||
4800: 1,
|
||||
}
|
||||
|
||||
for _, baud := range baudRates {
|
||||
|
||||
Reference in New Issue
Block a user