Sign test: measure ALL gimbal axes + self-healing altitude supervisor; link diagnostics
- Sign test measures rate response on every gimbal axis and picks the one that actually answers the differential push -> pitchIndex is now MEASURED per ship (build orientation no longer matters). Verified both-direction response accepted at half threshold. Tilt guard watches all axes. - Altitude supervisor: drifting out of the measuring band re-centers and retries instead of aborting; single 7-min deadline. Faster hover trim (0.05 -> 0.12, matches verified Ki_climb) plus an 8 s settle phase. - Single-balloon ships: sign test marks itself done, FLY zeroes u_diff. - Cockpit terminal now explains link status (OFFLINE checklist); autopilot standby screen warns loudly when no modem is attached. - Failure text points at cross-wired links (both burners firing on one pulse). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -151,6 +151,34 @@ local function draw()
|
||||
if page == "settings" then drawSettings() else drawStatus() end
|
||||
end
|
||||
|
||||
-- terminal-diagnostikk: monitoren viser pilot-UI, terminalen FORKLARER link-status --
|
||||
-- "OFFLINE" skal aldri vaere et mysterium (vanligste aarsak: AP-PCen er ikke i standby/fly)
|
||||
local function drawTerm()
|
||||
term.clear(); term.setCursorPos(1, 1)
|
||||
print("==== COCKPIT CONSOLE ====")
|
||||
print(string.format("Monitor %dx%d modem: open", W, H))
|
||||
print("")
|
||||
if online() then
|
||||
local s = status
|
||||
print(string.format("Link: ONLINE (heartbeat %.1fs ago)", now() - lastRx))
|
||||
print("State: " .. tostring(s.state)
|
||||
.. ((s.reason and s.reason ~= "") and (" (" .. tostring(s.reason) .. ")") or ""))
|
||||
print(string.format("Height %.1f -> %.0f Pitch %+.1f", s.height or 0, s.target or 0, s.pitch or 0))
|
||||
print(s.ready == false and "AP needs setup (wizard on the AP PC)" or "Control via the monitor buttons.")
|
||||
else
|
||||
print("Link: OFFLINE -- no heartbeat from the")
|
||||
print("machine-room PC. Checklist over there:")
|
||||
print(" 1) It must be in STANDBY or FLY mode")
|
||||
print(" (menu/setup/shell do NOT broadcast)")
|
||||
print(" 2) It needs a modem attached -- its")
|
||||
print(" standby screen shows 'Link: modem OK'")
|
||||
print(" 3) Wireless out of range? Use wired")
|
||||
print(" modems + network cable instead.")
|
||||
end
|
||||
print("")
|
||||
print("CTRL+T = quit")
|
||||
end
|
||||
|
||||
local function handleTouch(x, y)
|
||||
for _, b in ipairs(buttons) do
|
||||
if x >= b.x1 and x <= b.x2 and y >= b.y1 and y <= b.y2 then b.action(); draw(); return end
|
||||
@@ -158,6 +186,7 @@ local function handleTouch(x, y)
|
||||
end
|
||||
|
||||
draw()
|
||||
drawTerm()
|
||||
local redraw = os.startTimer(0.5)
|
||||
while true do
|
||||
local e = { os.pullEvent() }
|
||||
@@ -166,6 +195,6 @@ while true do
|
||||
elseif e[1] == "monitor_touch" then
|
||||
handleTouch(e[3], e[4])
|
||||
elseif e[1] == "timer" and e[2] == redraw then
|
||||
redraw = os.startTimer(0.5); draw()
|
||||
redraw = os.startTimer(0.5); draw(); drawTerm()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user