I did fix it, but had to do another fix too
This commit is contained in:
60
startup.lua
60
startup.lua
@ -697,17 +697,30 @@ local function handleOutgoingDial()
|
||||
end
|
||||
end
|
||||
|
||||
-- Check if remote iris is closed (for safety, not password prompting)
|
||||
local remoteIrisState = nil
|
||||
if transceiver then
|
||||
remoteIrisState = transceiver.checkConnectedShielding()
|
||||
end
|
||||
|
||||
-- Close local iris if remote iris is closed (unsafe for travel)
|
||||
if remoteIrisState and remoteIrisState > 0 then
|
||||
if config.irisEnabled then
|
||||
utils.closeIris()
|
||||
end
|
||||
if remoteIrisState == 100 then
|
||||
utils.log("WARNING: Remote iris is fully closed!")
|
||||
else
|
||||
utils.log("WARNING: Remote iris is " .. remoteIrisState .. "% closed!")
|
||||
end
|
||||
end
|
||||
|
||||
local connectionSafe = false
|
||||
|
||||
-- If remote computer requested a password, show the prompt
|
||||
if state.remotePasswordRequired then
|
||||
utils.log("Password required by remote gate")
|
||||
|
||||
-- Close local iris to protect travelers
|
||||
if config.irisEnabled then
|
||||
utils.closeIris()
|
||||
end
|
||||
|
||||
local result = HandlePasswordEntry()
|
||||
|
||||
-- Check if iris opened during password entry (via GDO)
|
||||
@ -742,6 +755,14 @@ local function handleOutgoingDial()
|
||||
end
|
||||
end
|
||||
|
||||
-- Re-check remote iris state after password/GDO attempt
|
||||
if transceiver then
|
||||
remoteIrisState = transceiver.checkConnectedShielding()
|
||||
if not remoteIrisState or remoteIrisState == 0 then
|
||||
connectionSafe = true
|
||||
end
|
||||
end
|
||||
|
||||
-- If still not safe, show warning
|
||||
if not connectionSafe then
|
||||
mon.setBackgroundColor(colors.red)
|
||||
@ -757,8 +778,33 @@ local function handleOutgoingDial()
|
||||
display.drawDisconnectButton()
|
||||
end
|
||||
else
|
||||
-- No password required - connection is safe
|
||||
connectionSafe = true
|
||||
-- No password required - check if remote iris is open
|
||||
if transceiver then
|
||||
remoteIrisState = transceiver.checkConnectedShielding()
|
||||
end
|
||||
|
||||
if not remoteIrisState or remoteIrisState == 0 then
|
||||
-- Remote iris is open - connection is safe
|
||||
connectionSafe = true
|
||||
else
|
||||
-- Remote iris is closed but no password system - show warning
|
||||
utils.log("WARNING: Remote iris closed but no password system available")
|
||||
mon.setBackgroundColor(colors.red)
|
||||
mon.clear()
|
||||
mon.setTextScale(1)
|
||||
mon.setCursorPos(6, 5)
|
||||
mon.write("REMOTE IRIS")
|
||||
mon.setCursorPos(8, 7)
|
||||
if remoteIrisState == 100 then
|
||||
mon.write("CLOSED!")
|
||||
else
|
||||
mon.write(remoteIrisState .. "% CLOSED")
|
||||
end
|
||||
mon.setCursorPos(3, 10)
|
||||
mon.write("Connection unsafe")
|
||||
display.drawIrisStatus()
|
||||
display.drawDisconnectButton()
|
||||
end
|
||||
end
|
||||
|
||||
utils.log("DEBUG: Before iris opening check - connectionSafe=" ..
|
||||
|
||||
Reference in New Issue
Block a user