why u no open local iris ;-;

This commit is contained in:
2026-01-02 00:46:07 -05:00
parent cc0fd4974f
commit 47986336cc
3 changed files with 8 additions and 27 deletions

View File

@ -744,9 +744,6 @@ local function handleOutgoingDial()
local message = state.lastReceivedMessage
state.lastReceivedMessage = nil
-- DEBUG: Print all messages received
print("DEBUG: Message received: " .. tostring(message))
utils.log("DEBUG: Message received: " .. tostring(message))
utils.debug("Received: " .. tostring(message))
if message and message:sub(1, 6) == "SGCS_V" then
@ -772,18 +769,13 @@ local function handleOutgoingDial()
else
-- Timeout - if we got a version message, assume no password required
if state.remoteHasComputer and (os.clock() - lastMessageTime) > 0.5 then
print("DEBUG: Breaking - got version, no password request after 0.5s")
break -- No more messages coming
elseif not state.remoteHasComputer and (os.clock() - startTime) > 1 then
print("DEBUG: Breaking - no version message after 1s")
break -- No computer at remote gate
end
end
end
print("DEBUG: Message collection complete. remoteHasComputer=" ..
tostring(state.remoteHasComputer) .. ", remotePasswordRequired=" .. tostring(state.remotePasswordRequired))
-- Check if remote iris is closed using transceiver
local remoteIrisState = nil
if transceiver then
@ -811,15 +803,17 @@ local function handleOutgoingDial()
local result = HandlePasswordEntry()
utils.log("DEBUG: HandlePasswordEntry returned: " .. tostring(result))
utils.debug("HandlePasswordEntry returned: " .. tostring(result))
-- Check if iris opened during password entry (via GDO)
if result == "IRIS_OPENED" then
utils.debug("Setting connectionSafe=true after IRIS_OPENED")
utils.log("Iris opened during password entry (via GDO or message)")
connectionSafe = true
-- Show success message briefly
display.showPasswordResult(true)
sleep(1)
utils.debug("After success display, connectionSafe=" .. tostring(connectionSafe))
elseif result then
-- Password was entered, send it
utils.debug("Sent: IRIS_PASSWORD:" .. result)
@ -850,10 +844,8 @@ local function handleOutgoingDial()
-- Re-check iris state after password/GDO attempt
if transceiver then
remoteIrisState = transceiver.checkConnectedShielding()
utils.log("Re-checked remote iris state: " .. tostring(remoteIrisState))
if not remoteIrisState or remoteIrisState == 0 then
connectionSafe = true
utils.log("Remote iris confirmed open")
end
end
end
@ -889,6 +881,7 @@ local function handleOutgoingDial()
-- Only open local iris if connection is safe
if connectionSafe and config.irisEnabled then
utils.debug("Opening local iris NOW")
utils.log("Connection safe - opening local iris")
-- Wait 2 seconds to avoid voiding the iris
sleep(2)