fix targetOutput staying at 0 due to save before init
This commit is contained in:
+3
-3
@@ -164,9 +164,7 @@ function load_config()
|
|||||||
sr.close()
|
sr.close()
|
||||||
end
|
end
|
||||||
|
|
||||||
if fs.exists("reactorconfig.txt") == false then
|
if fs.exists("reactorconfig.txt") then
|
||||||
save_config()
|
|
||||||
else
|
|
||||||
load_config()
|
load_config()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -174,6 +172,8 @@ if not targetOutput then
|
|||||||
targetOutput = fluxgate.getSignalLowFlow()
|
targetOutput = fluxgate.getSignalLowFlow()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
save_config()
|
||||||
|
|
||||||
function reset()
|
function reset()
|
||||||
term.clear()
|
term.clear()
|
||||||
term.setCursorPos(1,1)
|
term.setCursorPos(1,1)
|
||||||
|
|||||||
Reference in New Issue
Block a user