chore: update global refs

This commit is contained in:
2026-07-30 15:25:07 -04:00
parent e3320a07c0
commit a40bc4e33a
5 changed files with 20 additions and 20 deletions
+12 -12
View File
@@ -184,7 +184,7 @@ local function download(url, destination, maxBytes, expectedSize, hash)
removeFile(destination)
collectgarbage("collect")
log.debug("APPSTORE DOWNLOAD " .. destination)
return net.download(url, destination, {
return http.download(url, destination, {
maxBytes = maxBytes,
expectedSize = expectedSize,
sha256 = hash
@@ -456,13 +456,13 @@ local function startInstall()
-- Shed The Catalog Before The Radio - install downloads run with the Wi-Fi and TLS stacks
-- resident, and 64 held entries are what tips this into OOM. Rebuilt from cache on the way out.
apps = {}
if net.wifiStatus() == "connected" then
if wifi.status() == "connected" then
local ok, result = install(detailApp)
net.wifiDisconnect()
wifi.disconnect()
finishInstall(result)
else
pendingApp = detailApp
net.wifiConnect()
wifi.connect()
screen = "connecting"
needsDraw = true
end
@@ -500,7 +500,7 @@ local function openRepository(forceDownload)
end
pendingRepository = currentRepository
net.wifiConnect()
wifi.connect()
screen = "connecting"
needsDraw = true
end
@@ -517,7 +517,7 @@ end
function draw()
if screen == "connecting" then
if input.wasPressed("back") then
net.wifiDisconnect()
wifi.disconnect()
pendingRepository = nil
if pendingApp then
pendingApp = nil
@@ -528,20 +528,20 @@ function draw()
needsDraw = true
end
else
local status = net.wifiStatus()
local status = wifi.status()
if status == "connected" then
log.info("APPSTORE WIFI_CONNECTED")
if pendingApp then
local app = pendingApp
pendingApp = nil
local ok, result = install(app)
net.wifiDisconnect()
wifi.disconnect()
finishInstall(result)
else
local repository = pendingRepository
pendingRepository = nil
local ok, err = loadCatalog(repository)
net.wifiDisconnect()
wifi.disconnect()
if ok then
selected = 1
screen = "apps"
@@ -552,7 +552,7 @@ function draw()
end
elseif status == "failed" then
log.error("APPSTORE WIFI_FAILED")
net.wifiDisconnect()
wifi.disconnect()
if pendingApp then
pendingApp = nil
finishInstall("Wi-Fi connection failed")
@@ -587,7 +587,7 @@ function draw()
deleteApp()
elseif screen == "message" then
if pendingRepository == "exit" then
net.wifiDisconnect()
wifi.disconnect()
sys.exit()
return
end
@@ -606,7 +606,7 @@ function draw()
elseif screen == "message" and pendingRepository ~= "exit" then
leaveMessage()
else
net.wifiDisconnect()
wifi.disconnect()
sys.exit()
return
end
+1 -1
View File
@@ -1,3 +1,3 @@
XTEINK-MANIFEST|1
main.lua|22929|abbb63d18bbd0a4cefea9240a0e22b57a5e12de4fc36e789f8995c79465ec226
main.lua|22897|6b4e9cf3d9edf2159162500b0f0ef3a10e026f2a65d18f50506ec6734a5f6abc
repositories.default.txt|108|70e442650788dd8d8632142ef3ff43a4aaee9855da89283facc72a8942e0a7df
+4 -4
View File
@@ -84,7 +84,7 @@ local function fetchCards()
screen = "Loading Home Assistant..."
needsDraw = true
local body, status = net.post(config.url .. "/api/template", templateRequest(), {
local body, status = http.post(config.url .. "/api/template", templateRequest(), {
Authorization = "Bearer " .. config.token,
["Content-Type"] = "application/json"
})
@@ -155,18 +155,18 @@ function init()
screen = "Connecting to Wi-Fi..."
connecting = true
net.wifiConnect()
wifi.connect()
end
function draw()
if input.wasPressed("back") then
if connecting or connected then net.wifiDisconnect() end
if connecting or connected then wifi.disconnect() end
sys.exit()
return
end
if connecting then
local wifi = net.wifiStatus()
local wifi = wifi.status()
if wifi == "connected" then
connecting = false
connected = true
+1 -1
View File
@@ -1,3 +1,3 @@
XTEINK-MANIFEST|1
config.txt|280|db80ede9c74ccd83b76f1bb64ca7193cc6477de905bad6d153730ec66768bfa7
main.lua|6142|a4d9b06919c73ca42b1c0325aa128740c2956214a22b857ae177a8e528d98786
main.lua|6134|466352d126cc8cf7341c59b1bfdb4779fb5aef030946f399aaacea5d6b9f9b57
+2 -2
View File
@@ -1,7 +1,7 @@
XTEINK-CATALOG|1
2048|Slide and merge tiles to reach 2048|apps/2048/manifest.txt|97|076bb167420b0694dac113fb7a2c48e37f008fc636d7d6b889fe22537ae54b7c
AppStore|Install apps from public Xteink repositories|apps/AppStore/manifest.txt|192|bb73280b6cb691486ca26178527b746ce8eb67f205f258e920505c228e138848
AppStore|Install apps from public Xteink repositories|apps/AppStore/manifest.txt|192|cd8fa1cd28e2fdd12926b185e925adb7d6ce591fc11ab35451513278d04f2f86
BinaryKeyboard|Two-button recursive keyboard experiment|apps/BinaryKeyboard/manifest.txt|97|893867dba0ae2725caca1eb56375c98c4dd00d351134aa129698c51f97e25690
BLETest|Test BLE scanning, connecting, and characteristic read/write|apps/BLETest/manifest.txt|97|4e06f4c312a6e8e086ec2dbaf2f8c043da17becad3a4e48841ae0313151f81cf
HomeAssistant|Home Assistant status cards|apps/HomeAssistant/manifest.txt|177|b38ca49804444fd383a505ce9c51680ad9b7443950d682ca1b9ef3047bff98a5
HomeAssistant|Home Assistant status cards|apps/HomeAssistant/manifest.txt|177|b05861d1df2a7f572251216b03432a2df7f806f2666b8f484057ce80ba3387b1
Wordle|Guess the five-letter word in six tries|apps/Wordle/manifest.txt|177|fcced5ebacc0f1c8d77ff4683806d38d6f47edbbe2b0665c9bc96920d9f0bc3e