Keith's LUA Help thread.

Help creating logic scripts for Air Manager Instruments

Moderators: Ralph, russ

Message
Author
Mike Horsten
Posts: 79
Joined: Tue Dec 01, 2020 8:50 am

Re: Keith's LUA Help thread.

#271 Post by Mike Horsten » Fri Apr 23, 2021 1:06 pm

Thanks Keith
Building a home Cessna 172SP Steam. X-plane/MFS2020
(ex Name on Airmanager forum Polarair)

User avatar
jph
Posts: 661
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: MULTIPLE assignments to one pin

#272 Post by jph » Sat Apr 24, 2021 11:00 am

Mike Horsten wrote:
Fri Apr 23, 2021 1:00 pm
Hi Guru's.

Noob question, example question. I have a plane with 4 engines, 4 prop controls, 4 minxure controls. Can i assign engine 1/2/3/4 to one linear hardware pod and control alle engines with one. Same would go for the Mixture and Prop control. reason for asking, if i would like to fly a DC6 for example my current setup is a C172. The instruments i can change but the hardware is a bit more tricky.

Code wise it would be same as the tutorial. That has an error in it.
- For X-Plane we need to override the joystick input first NONONONONO this disables all Joystick input like the ruddel pedals, saitek yoke and all others !!!!!
xpl_dataref_write("sim/operation/override/override_joystick", "INT", 1) -- DONT USE this part of the example
[/b]



Mike
Hi Mike,
In the joystick setup of X-Plane simply assign the 'throttle' on your controller to 'throttle' in X-Plane and this will control all - same for props / mixture etc . this is on the top of the screen in X=Plane when you select the axis.
unless you are trying to do this in AM ???? - which I would certainly not recommend. IMHO, for all normal axis inputs then use the normal HID game controller / joystick . If you want to make your own with an Arduino then it is no problem with the Leonardo Or Pro Micro. Completely independent of AM/// Apologies if I am misunderstanding your intent .
X=Plane does this natively if you require it.
Joe
“Everything in moderation, including moderation.”
“Experience is merely the name men gave to their mistakes.”
Joe (CISSP) -IT security consultant

Mike Horsten
Posts: 79
Joined: Tue Dec 01, 2020 8:50 am

Re: MULTIPLE assignments to one pin

#273 Post by Mike Horsten » Sun Apr 25, 2021 6:51 am

Joe,

When i started building the TMP for the C172 i used this command as its in the WIKI. and designed the 3 units with liniar pods (TMP). Al worked on well the workbench/test setup and then i installed it in the rig. As i integrated some external parts i noticed a problem . My rudders and yoke where not working any more. With the command in place all my other inputs from joysticks (CHPro/Saitek) stopped working , because i told XP to do so because of the command. It took me some time to understand that this was the issue. Its a general disablement command not only for the things i was doing. That's why i mention it, as its in the wiki.. remove it you can always add a special command later.

Mike
Building a home Cessna 172SP Steam. X-plane/MFS2020
(ex Name on Airmanager forum Polarair)

User avatar
jph
Posts: 661
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: MULTIPLE assignments to one pin

#274 Post by jph » Sun Apr 25, 2021 9:22 am

Mike Horsten wrote:
Sun Apr 25, 2021 6:51 am
Joe,

When i started building the TMP for the C172 i used this command as its in the WIKI. and designed the 3 units with liniar pods (TMP). Al worked on well the workbench/test setup and then i installed it in the rig. As i integrated some external parts i noticed a problem . My rudders and yoke where not working any more. With the command in place all my other inputs from joysticks (CHPro/Saitek) stopped working , because i told XP to do so because of the command. It took me some time to understand that this was the issue. Its a general disablement command not only for the things i was doing. That's why i mention it, as its in the wiki.. remove it you can always add a special command later.

Mike
Hi Mike, If I understand you correctly, then I would seriously suggest that you 'roll your own' Game Controller / Joystick using a Leonardo or Pro Micro arduino. It is nothing at all to do with AM, it simply adds a game controller to the windows control panel. You can then do whatever you want. I am sure there are some uses for this in AM, but as of yet, I fail to see them. The game controller via Arduino joystick library is HID - DIRECT to windows and a higher priority than AM.
I think AM is bloody amazing - but as far as game controllers / Joysticks ???? ... standard USB HID 100% of the time.
Joe
“Everything in moderation, including moderation.”
“Experience is merely the name men gave to their mistakes.”
Joe (CISSP) -IT security consultant

Mike Horsten
Posts: 79
Joined: Tue Dec 01, 2020 8:50 am

Re: Keith's LUA Help thread.

#275 Post by Mike Horsten » Sun Apr 25, 2021 11:22 am

No you missunderstood, but dont worry....it works
Building a home Cessna 172SP Steam. X-plane/MFS2020
(ex Name on Airmanager forum Polarair)

User avatar
jph
Posts: 661
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Keith's LUA Help thread.

#276 Post by jph » Sun Apr 25, 2021 11:52 am

Mike Horsten wrote:
Sun Apr 25, 2021 11:22 am
No you missunderstood, but dont worry....it works
:D Glad I did Mike.
Excellent. The end result is all that matters,
Joe ;)
“Everything in moderation, including moderation.”
“Experience is merely the name men gave to their mistakes.”
Joe (CISSP) -IT security consultant

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests