UWU
This commit is contained in:
34
src/boot.lua
34
src/boot.lua
@@ -7,40 +7,23 @@ local function checkForUpdate()
|
||||
current_time = os.time()
|
||||
difference = math.abs(current_time - LAST_USED)
|
||||
print("Checking for update... difference: " .. tostring(difference))
|
||||
--its been considerable time since the keypad was interacted with, therefore it's time to force an update down the users throat (microsoft moment)
|
||||
--its been considerable time since the keypad was interacted with
|
||||
--therefore it's time to force an update down the users throat (microsoft moment)
|
||||
-- if difference > 4 then
|
||||
if difference > .5 then
|
||||
|
||||
--logic for updating
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function updateChecker()
|
||||
|
||||
while true do
|
||||
checkForUpdate()
|
||||
sleep(1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local function boot()
|
||||
KEYPADOS_VERSION = "3.0"
|
||||
|
||||
monitor = peripheral.find("monitor")
|
||||
monitor.clear()
|
||||
monitor.setTextScale(0.5)
|
||||
y = 1
|
||||
|
||||
function mPrint(text)
|
||||
monitor.setCursorPos(1,y)
|
||||
monitor.write(text)
|
||||
y = y + 1
|
||||
end
|
||||
|
||||
mPrint("keypadOS v" .. KEYPADOS_VERSION)
|
||||
|
||||
local function getBasalt()
|
||||
if fs.exists("basalt.lua") then
|
||||
mPrint("Basalt found!")
|
||||
else
|
||||
@@ -53,10 +36,15 @@ local function boot()
|
||||
mPrint("Rebooting...")
|
||||
os.reboot()
|
||||
end
|
||||
end
|
||||
|
||||
monitor.setTextScale(1)
|
||||
monitor.clear()
|
||||
KEYPADOS_VERSION = "3.0"
|
||||
MONITOR = peripheral.find("monitor")
|
||||
|
||||
local function boot()
|
||||
mon_reset(0.5);
|
||||
mPrint("keypadOS v" .. KEYPADOS_VERSION)
|
||||
mon_reset(1);
|
||||
end
|
||||
|
||||
boot()
|
||||
|
||||
11
src/utils.lua
Normal file
11
src/utils.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
MONITOR_Y = 1
|
||||
function mPrint(text)
|
||||
MONITOR.setCursorPos(1,y)
|
||||
MONITOR.write(text)
|
||||
MONITOR_Y = MONITOR_Y + 1
|
||||
end
|
||||
|
||||
function mon_reset(scale)
|
||||
MONITOR.clear()
|
||||
MONITOR.setTextScale(scale)
|
||||
end
|
||||
Reference in New Issue
Block a user