refactor: streamline driver loading in main and startup scripts

This commit is contained in:
2025-06-14 12:39:46 -04:00
parent 2e257a7b1e
commit 5976b2c1c3
3 changed files with 4 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ local function addDriver(fileName)
local baseRoute = "https://git.astrocore.space/root/NovaCorpLLC/raw/branch/main/"
shell.execute("wget", baseRoute .. fullFile)
sleep(1)
return require(fileName)
end
return { addDriver = addDriver }

View File

@@ -1,8 +1,7 @@
local function run()
print("Running main loop")
local tempDriver = require("temperature_monitor")
local kernel = require("kernel")
local tempDrive = kernel.addDriver("temperature_monitor")
local monitor = peripheral.find("monitor")
while true do
monitor.clear()
monitor.setCursorPos(1,1)

View File

@@ -1,7 +1,3 @@
local kernel = require("kernel")
kernel.addDriver("temperature_monitor")
kernel.addDriver("main")
local main = kernel.addDriver("main")
sleep(5)
local main = require("main")
main.run()