So after some fiddling around, I managed to write a LUA script that can be used to make the IDENT and transponder mode of the default A2A C182 work with the PilotEdge client (Sqwuakbox). I thought I'd share my solution if anyone is interested.
What I did was to place the following LUA script in a file called "...\P3D\Modules\A2A-XPDR.lua":
Code: Select all
function A2A_OnXpdrModeChanged(varname, value)
if value == 4 then
if ipc.readUB(0x7b91) > 0 then
ipc.writeUB(0x7b91,0)
ipc.display("XPDR Mode C", 2)
end
else
if ipc.readUB(0x7b91) == 0 then
ipc.display("XPDR Mode Stdby", 2)
ipc.writeUB(0x7b91,1)
end
end
end
function A2A_XpdrIdentPressed(varname, value)
local mode = ipc.readLvar("xpdr_onoff_knob_pos")
if mode >= 3 then
if value == 1 then
ipc.writeUB(0x7b93, 1)
ipc.display("XPDR IDENT", 1, 2)
end
end
end
event.Lvar("xpdr_onoff_knob_pos", 1000, "A2A_OnXpdrModeChanged")
event.Lvar("xpdr_ident_button", 200, "A2A_XpdrIdentPressed")
Then I modified the FSUIPC.ini file and added an [Auto] section to start this lua file, like so:
Note that this will not work if you use the GTN-750/650 to control the transponder. I have yet to figure if it is possible to get these working, but for the default transponder it seems to work fine.
(The lines containing "ipc.display" can be removed if you don't want to be notified that the transponder mode change was registered and propagated to the PE-client).