Update src/boot.lua

This commit is contained in:
xomf 2024-08-17 22:47:56 +00:00
parent 4d95562f84
commit 34fe5021a3

View File

@ -1,6 +1,29 @@
-- keycardOS "bootloader", has no access to basalt -- keycardOS "bootloader", has no access to basalt
-- intended for checking for updates, and automatically updating basalt if it is missing -- intended for checking for updates, and automatically updating basalt if it is missing
LAST_USED = os.time()
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)
if difference > .5 then
--logic for updating
end
end
function updateChecker()
while true do
checkForUpdate()
sleep(1)
end
end
local function boot() local function boot()
KEYPADOS_VERSION = "3.0" KEYPADOS_VERSION = "3.0"