mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-16 07:10:32 +01:00
make code slightly clearer
This commit is contained in:
parent
9d34a1601e
commit
01513d3e4f
|
@ -420,14 +420,16 @@ yc.command_sbi = function(params, eeprom, L, Lv)
|
|||
|
||||
if status == nil then return nil, nil end
|
||||
|
||||
local b = params[1]:byte()
|
||||
if #params[1]==1 and 65 <= b and b <= 68 then -- is a port
|
||||
if status == "1" then
|
||||
Lv = yc.set_portstate (params[1], true, Lv)
|
||||
else
|
||||
Lv = yc.set_portstate (params[1], false, Lv)
|
||||
if #params[1]==1 then
|
||||
local b = params[1]:byte()
|
||||
if 65 <= b and b <= 68 then -- is a port
|
||||
if status == "1" then
|
||||
Lv = yc.set_portstate (params[1], true, Lv)
|
||||
else
|
||||
Lv = yc.set_portstate (params[1], false, Lv)
|
||||
end
|
||||
return eeprom, Lv;
|
||||
end
|
||||
return eeprom, Lv;
|
||||
end
|
||||
|
||||
--is an eeprom address
|
||||
|
|
Loading…
Reference in New Issue
Block a user