[fluksod] set msg.received.{l,u} to nil when equal to empty string
This commit is contained in:
parent
fc1f955b51
commit
c2c2dd051b
|
@ -126,6 +126,8 @@ function rx(msg, cdev)
|
|||
end
|
||||
|
||||
msg.received.l, msg.received.u = msg.received.raw:match('^l(%w*)%.?u(%w*)%.?$')
|
||||
if msg.received.l == '' then msg.received.l = nil end
|
||||
if msg.received.u == '' then msg.received.u = nil end
|
||||
|
||||
if msg.received.l then
|
||||
msg.received.crc = msg.received.l:sub(-2, -1)
|
||||
|
|
Loading…
Reference in New Issue