Handle yaml 8e1 transparently

This commit is contained in:
andig 2021-09-08 09:54:10 +02:00
parent 1f4cf16ad2
commit dbc09b49ed

View file

@ -158,6 +158,8 @@ func NewConnection(uri, device, comset string, baudrate int, wire WireFormat, sl
if device != "" {
switch strings.ToUpper(comset) {
case "8N1", "8E1":
case "80":
comset = "8E1"
default:
return nil, fmt.Errorf("invalid comset: %s", comset)
}