After some additional looking it turns out that there is no ASCRJ_ELEC_EXTPWR_ON and OFF function in the CRJ Aircraft Module. However, the ASCRJ_ELEC_GPU_toggle function toggles the AC AVAIL and AC IN USE button on the overhead panel. The following bit of code can be added to your User Module in order to assign a toggle function to your button. After i added the code clip using the LINDA Editor, I had to restart LINDA to get it to work. Best of luck, I'll try to assist if you have questions. -Tom
function ASCRJ_ELEC_GPU_on ()
local Lvar = "ASCRJ_ELEC_GPU"
local Lvar1 = "ASCRJ_ELEC_GPU_ANIM"
local state = ipc.readLvar(Lvar)
_loggg('[ACRJ] state = ' .. state)
if state == 0 then
ipc.writeLvar(Lvar, 1)
ipc.writeLvar(Lvar1, 5)
ipc.sleep(100)
ipc.writeLvar(Lvar1, 3)
end
DspShow("ExtP", "on")
end
function ASCRJ_ELEC_GPU_off ()
local Lvar = "ASCRJ_ELEC_GPU"
local Lvar1 = "ASCRJ_ELEC_GPU_ANIM"
local state = ipc.readLvar(Lvar)
_loggg('[ACRJ] state = ' .. state)
if state == 1 then
ipc.writeLvar(Lvar, 0)
ipc.writeLvar(Lvar1, 5)
ipc.sleep(100)
ipc.writeLvar(Lvar1, 0)
end
DspShow("ExtP", "off")
end
function ASCRJ_ELEC_GPU_toggle ()
local Lvar = "ASCRJ_ELEC_GPU"
local state = ipc.readLvar(Lvar)
if state == 0 then
ASCRJ_ELEC_GPU_on ()
else
ASCRJ_ELEC_GPU_off ()
end
end