Hello,
I'm very new to this Air Manager & programming. I'm able to copy,paste, edit for known switches to work, like the Master aka Battery Switch.
ref: Thranda Quest Kodiak 100 aircraft. works good in Xplane.
My problem, is that Thranda did not write a couple needed commands: AvnBus, & AuxBus. He did write some datarefs for those two switches. just no commands. and there are NOT any overlapping commands in Xplane either. I've scrolled thru the list in the DataRef Tool Editor.
so, i'm sure he's got some built in method for activating those switches, but I can figure it out.
If anyone has an operable solution would you please educate me, or share?
and better yet, if anyone has already made a panel for the Thranda Quest Kodiak aircraft, would you mind sharing your panel?
thank you in advance,
Dave
Thranda Kodiak Master Switch Panel - Help!!
Re: Thranda Kodiak Master Switch Panel - Help!!
Why not write the datarefs in that case?
Re: Thranda Kodiak Master Switch Panel - Help!!
is there a good example I can copy?
thanks
Dave
thanks
Dave
Re: Thranda Kodiak Master Switch Panel - Help!!
Writing of datarefs doesn't happen that often. The wiki has an example: https://siminnovations.com/wiki/index.p ... aref_write
I believe that the Cessna 172 clock and EGT also write a datarefs, but I'm not absolutely sure.
I believe that the Cessna 172 clock and EGT also write a datarefs, but I'm not absolutely sure.
Re: Thranda Kodiak Master Switch Panel - Help!!
Thanks for pointing me in the right direction. i'll give it a try,
Cheers!
Dave
Cheers!
Dave
Re: Thranda Kodiak Master Switch Panel - Help!!
Ralph,
again, thanks for the direction. I found a decent example and modified for my use, tested, and it works!
here is the code i used for writing to the dataref:
Cheers
Dave
again, thanks for the direction. I found a decent example and modified for my use, tested, and it works!
here is the code i used for writing to the dataref:
- -- Aux Bus
--thranda/electrical/AuxiliaryBus
function set_auxbus(position)
position = math.abs( position - 1)
xpl_dataref_write("thranda/electrical/AuxiliaryBus","INT", position)
end
auxbus_sw = switch_add( "SwitchWh_off.png" , "SwitchWh_on.png", 165,64,58,125, set_auxbus)
function auxbus_change(axb)
switch_set_position(auxbus_sw, axb)
end
xpl_dataref_subscribe("thranda/electrical/AuxiliaryBus","INT", auxbus_change)
Cheers
Dave
Re: Thranda Kodiak Master Switch Panel - Help!!
Dave, were you able to make headway on the Kodiak master switch panel Lua scripting. I am looking at the Kodiak now and have the Simstrumentation panel that includes the Lua code for MS2020 simulator but not the Xplane. I have a rudimentary understanding of the Lua script. I am able to pick out the dataref or commands to use but struggle to integrate into the script. Any nudge to get me going on one of the switches is welcome. Bill