summaryrefslogtreecommitdiff
path: root/mesecons_microcontroller
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_microcontroller')
-rw-r--r--mesecons_microcontroller/init.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua
index 7e290a3..6778a10 100644
--- a/mesecons_microcontroller/init.lua
+++ b/mesecons_microcontroller/init.lua
@@ -262,7 +262,7 @@ function parse_get_command(code, starti)
if s == "(" then
return string.sub(code, starti, i-1), i + 1 -- i: ( i+1 after (
end
- if s == ";" and starti == i then
+ if s == ";" and starti == i then
starti = starti + 1
i = starti
elseif s == ">" then
@@ -410,7 +410,7 @@ function yc_command_sbi(params, eeprom, L, Lv)
--is an eeprom address
local new_eeprom = "";
for i=1, #eeprom do
- if tonumber(params[1])==i then
+ if tonumber(params[1])==i then
new_eeprom = new_eeprom..status
else
new_eeprom = new_eeprom..eeprom:sub(i, i)
@@ -476,7 +476,7 @@ function yc_command_if_getcondition(code, starti)
local brackets = 1 --1 Bracket to close
while s ~= "" do
s = string.sub(code, i, i)
-
+
if s == ")" then
brackets = brackets - 1
end
@@ -539,7 +539,7 @@ function yc_command_parsecondition(cond, L, eeprom)
i = i + 1
end
- local i = 2
+ local i = 2
local l = string.len(cond)
while i<=l do
local s = cond:sub(i,i)
@@ -612,12 +612,12 @@ function yc_action_setports(pos, L, Lv)
if L.b == true then mesecon.receptor_on(pos, rules)
else mesecon.receptor_off(pos, rules) end
end
- if Lv.c ~= L.c then
+ if Lv.c ~= L.c then
rules = microc_rules[name.."0100"]
if L.c == true then mesecon.receptor_on(pos, rules)
else mesecon.receptor_off(pos, rules) end
end
- if Lv.d ~= L.d then
+ if Lv.d ~= L.d then
rules = microc_rules[name.."1000"]
if L.d == true then mesecon.receptor_on(pos, rules)
else mesecon.receptor_off(pos, rules) end