rtmc/src/main.lua
2024-08-26 00:08:40 +03:00

45 lines
941 B
Lua

local utils = require("utils.lua")
local updater = require("updater.lua")
local mod = {}
KEYPADOS_VERSION = "4.0"
--- @class BootloaderLibs
--- @field log Logger
--- @field updater Updater
--- @field notifier Notifier
--- @field json JsonParser
--- @class Logger
--- @field error fun(...)
--- @field warn fun(...)
--- @field info fun(...)
--- @field debug fun(...)
--- @class Updater
--- @field addEntry fun(path: string, branch: string, url: string)
--- @class JsonParser
--- @field decode fun(s: string): table
--- @field encode fun(s: table): string
--- @class Notifier
--- @field notify fun(priority: "1"|"2"|"3"|"4"|"5", body: string)
---@param blibs BootloaderLibs
function mod.main(blibs)
print("blibs:" .. tostring(blibs));
mod.blibs = blibs;
utils.MonReset(0.5)
updater.GetBasalt()
utils.MonPrint("keypadOS v" .. KEYPADOS_VERSION)
utils.MonReset(1)
require("ui.lua").InitUi()
end
return mod;