apps: SDK Test 1.1 -- fix the entry point (1.0 rendered nothing)

My fault, and a good demonstration of why the bench test existed: 1.0 defined
app.start(), which the host never calls. The Lua app contract is on_open(w, h) /
on_input / on_tick / on_close, so 1.0 loaded cleanly and drew an empty screen --
no error, nothing to see.

Also takes the body width from on_open's argument instead of assuming 300 px, so
the rows wrap correctly on a Pager or a Tanmatsu rather than only on a T-Deck.

Shipped as 1.1 in its own directory: version dirs are immutable, and the catalog
bump is what makes a device fetch it at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kaj Schittecat
2026-08-13 14:20:46 +02:00
co-authored by Claude Opus 5
parent e51db4350e
commit f6b005e1be
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -2,5 +2,5 @@
{"id":"monitor","name":"RF Monitor","ver":"1.3","desc":"Scrollable: RSSI/noise chart with dBm axis, link margin, RX rate, radio params, heard feed."},
{"id":"airtime","name":"Airtime","ver":"1.3","desc":"Utilization bars with a % axis, rx/tx split, duty ceiling, budget. Reset button top-right."},
{"id":"snake","name":"Snake","ver":"1.0","desc":"The classic, in Lua. Swipe to steer."},
{"id":"sdktest","name":"SDK Test","ver":"1.0","desc":"Developer tool. Checks the extended Lua SDK on this board: capabilities, clock, battery, GPS, file access and its limits, keyboard input. Has a button that TRANSMITS a test message to Public (asks permission first)."}
{"id":"sdktest","name":"SDK Test","ver":"1.1","desc":"Developer tool. Checks the extended Lua SDK on this board: capabilities, clock, battery, GPS, file access and its limits, keyboard input. Has a button that TRANSMITS a test message to Public (asks permission first)."}
]}
@@ -1 +1 @@
{"id":"sdktest","name":"SDK Test","ver":"1.0","desc":"Developer tool. Checks the extended Lua SDK on this board: capabilities, clock, battery, GPS, file access and its limits, keyboard input. Has a button that TRANSMITS a test message to Public (asks permission first)."}
{"id":"sdktest","name":"SDK Test","ver":"1.1","desc":"Developer tool. Checks the extended Lua SDK on this board: capabilities, clock, battery, GPS, file access and its limits, keyboard input. Has a button that TRANSMITS a test message to Public (asks permission first)."}
@@ -1,22 +1,24 @@
-- SDK self-test. Exercises everything added to the extended SDK so the results
-- can be read off the screen instead of inferred from a build log.
-- Not for the store catalog: it is a bench tool.
-- Published to the store as a developer/bench tool.
local ui, sys, store, timer = wada.ui, wada.sys, wada.store, wada.timer
local C = ui.colors
local app = {}
local rows, keyline, sendline = {}, nil, nil
local W = 300 -- replaced with the real body width in on_open
local function row(y, text, color)
local l = ui.label(text, 6, y, 12, color or C.text)
l:width(300)
l:width(W - 12)
rows[#rows + 1] = l
return l
end
local function yn(v) return v and "yes" or "NO" end
function app.start()
function app.on_open(w, h)
W = w or 300
ui.scroll(true)
local y = 4