mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
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 <chplee@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@ config mbusd
|
|||||||
option device '/dev/ttyUSB0'
|
option device '/dev/ttyUSB0'
|
||||||
option speed 19200
|
option speed 19200
|
||||||
option databits 8
|
option databits 8
|
||||||
option parity 0
|
option parity 'N'
|
||||||
option stopbits 2
|
option stopbits 2
|
||||||
option rts 0
|
option rts 0
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ mbusd_instance() {
|
|||||||
[ "$enabled" -gt 0 ] || return 1
|
[ "$enabled" -gt 0 ] || return 1
|
||||||
|
|
||||||
|
|
||||||
[ "$parity" = 0 ] && parity=n || parity=y
|
[ "$parity" = 0 ] && parity=n
|
||||||
[ "$rts" = 0 ] && rts=
|
[ "$rts" = 0 ] && rts=
|
||||||
|
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ validate_section_mbusd() {
|
|||||||
'device:string' \
|
'device:string' \
|
||||||
'speed:uinteger' \
|
'speed:uinteger' \
|
||||||
'databits:uinteger' \
|
'databits:uinteger' \
|
||||||
'parity:bool' \
|
'parity:string' \
|
||||||
'stopbits:uinteger' \
|
'stopbits:uinteger' \
|
||||||
'rts:bool:0' \
|
'rts:bool:0' \
|
||||||
'rtu_retries:uinteger' \
|
'rtu_retries:uinteger' \
|
||||||
|
|||||||
Reference in New Issue
Block a user