From: Chip Lee Date: Sun, 6 Feb 2022 18:08:19 +0000 (+0800) Subject: mbusd: Repair UCI config file about parity X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=68704969ce7ce622a9cb8358672ba0d6c6af9316;p=feed%2Fpackages.git mbusd: Repair UCI config file about parity in mbusd, parity must be N, E or O, can't be y. Signed-off-by: Chip Lee --- diff --git a/net/mbusd/files/mbusd.conf b/net/mbusd/files/mbusd.conf index ea4e2ed549..9c457dfbcf 100644 --- a/net/mbusd/files/mbusd.conf +++ b/net/mbusd/files/mbusd.conf @@ -9,7 +9,7 @@ config mbusd option device '/dev/ttyUSB0' option speed 19200 option databits 8 - option parity 0 + option parity 'N' option stopbits 2 option rts 0 diff --git a/net/mbusd/files/mbusd.init b/net/mbusd/files/mbusd.init index 3699fbe1fc..dea2a080ea 100644 --- a/net/mbusd/files/mbusd.init +++ b/net/mbusd/files/mbusd.init @@ -14,7 +14,7 @@ mbusd_instance() { [ "$enabled" -gt 0 ] || return 1 - [ "$parity" = 0 ] && parity=n || parity=y + [ "$parity" = 0 ] && parity=n [ "$rts" = 0 ] && rts= @@ -50,7 +50,7 @@ validate_section_mbusd() { 'device:string' \ 'speed:uinteger' \ 'databits:uinteger' \ - 'parity:bool' \ + 'parity:string' \ 'stopbits:uinteger' \ 'rts:bool:0' \ 'rtu_retries:uinteger' \