Attitude Indicator - question

Post any technical issues here. This forum gets priority from our staff.
awreaper
Airman Basic
Posts: 9
Joined: 17 Dec 2015, 09:53

Attitude Indicator - question

Post by awreaper »

I am using the A2A C172 with FSUIPC. I map a button to control the up and down adjustment of the AI pitch ladder and when I press the button I see the values change in FSUIPC but watching the gauge on the C172, it does not change. I have similar set ups for VOR1, VOR2, Altitude Indicator, etc. and they all work fine. Am I doing something wrong? I even tried just mapping the pitch ladder in Prepar3d to a button, bypassing FSUIPC, and it did not work either.

Thanks in advance for the help.

User avatar
Nick - A2A
A2A Captain
Posts: 13764
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Attitude Indicator - question

Post by Nick - A2A »

It looks like you'll need to use a custom L:Var (gauge local variable) to adjust the attitude indicator bars in the A2A 172.

The L:Var in question is L:AttitudeIndicator and if you wish to map it to hardware or keyboard controls you'll need to use a macro file as described from page 40 of the "FSUIPC4 for Advanced Users.pdf". If you're not familiar with this method of programming L:Vars, this short step-by-step which I posted in the forums recently may help a bit.

For the L:Var in question, you'd want the contents of the macro file to include the following lines if you plan to map to a pair of buttons:

[MACROS]
1=L:AttitudeIndicator=DEC
2=L:AttitudeIndicator=INC

Hope this helps,
Nick
A2A Simulations Inc.

awreaper
Airman Basic
Posts: 9
Joined: 17 Dec 2015, 09:53

Re: Attitude Indicator - question

Post by awreaper »

Nick,

Thanks for the info. I will work on this over the weekend and let you know how it came out.

Thanks,

User avatar
Nick - A2A
A2A Captain
Posts: 13764
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Attitude Indicator - question

Post by Nick - A2A »

No problem. :) Good luck with the L:Var programming. I'm still pretty new to FSUIPC myself but it's not too tricky at all and once you've got a macro file set up there are lots of custom features of the A2A aircraft which you can control in this way. Various other custom L:Vars are listed in the PDF document linked in this topic.

Welcome to the forums and let us know if you have any difficulties with the FSUIPC stuff.

Cheers,
Nick

P.S. As a new forum member, it's also worth checking if you've downloaded and installed the latest Accu-Sim update available here.
A2A Simulations Inc.

awreaper
Airman Basic
Posts: 9
Joined: 17 Dec 2015, 09:53

Re: Attitude Indicator - question

Post by awreaper »

Nick,

I just tried it and my macro file is not showing up. I created a 1_PitchLadder.mcro file in the C:\Program Files(x86)\Lockheed Martin\Prepar3D v3\Modules folder. When I go under FSUIPC per the instructions, the macro file is not listed. Not sure what I am doing wrong.

Thanks

User avatar
Nick - A2A
A2A Captain
Posts: 13764
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Attitude Indicator - question

Post by Nick - A2A »

Not sure either. :? Is the 1_PitchLadder.mcro file a valid text file? (i.e. are you able to open it with Windows Notepad or similar and check that the content is as above?)

Nick
A2A Simulations Inc.

awreaper
Airman Basic
Posts: 9
Joined: 17 Dec 2015, 09:53

Re: Attitude Indicator - question

Post by awreaper »

Yes I can open it with Notepad and make changes, etc.

User avatar
Nick - A2A
A2A Captain
Posts: 13764
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Attitude Indicator - question

Post by Nick - A2A »

Not sure what else to suggest really other than 1: making sure you've updated to the most recent version of FSUIPC, and 2: checking the syntax of the text in the macro file is correct (MACROS in square brackets for the first line for example). This topic on the forums is where I learned about macro programming, so maybe worth a look. (From 'step 4' onwards anyway, as we already know what the relevant L:Var is.)

Thanks,
Nick
A2A Simulations Inc.

User avatar
Lewis - A2A
A2A Lieutenant Colonel
Posts: 33297
Joined: 06 Nov 2004, 23:22
Location: Norfolk UK
Contact:

Re: Attitude Indicator - question

Post by Lewis - A2A »

One of the outstanding issues with PED V3 is in the control area, I believe like us Pete of FSUIPC was awaiting a fix for a few issues. It could be this area is one of them. FSUIPC has a forum in which you can ask Pete.

thanks,
Lewis
A2A Facebook for news live to your social media newsfeed
A2A Youtube because a video can say a thousand screenshots,..
A2A Simulations Twitter for news live to your social media newsfeed
A2A Simulations Community Discord for voice/text chat

awreaper
Airman Basic
Posts: 9
Joined: 17 Dec 2015, 09:53

Re: Attitude Indicator - question

Post by awreaper »

I found out why it was not showing up. I left off the 1= and 2=. After that I can select each one but no matter if I set a parameter of -1 or -100 or +1 or +100 the pitch ladder does seem to move with a button twist, but it moves a minuscule amount. I even tried -500/+500.

User avatar
Nick - A2A
A2A Captain
Posts: 13764
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Attitude Indicator - question

Post by Nick - A2A »

The 'parameter' value will be setting the limit (max or min value for the function) rather than the rate of change. It also sounds like you're using a rotary axis rather than a 'button'. I don't have any experience of this method with a custom L:Var and I'm away from home for a few days so unable to experiment. What sort of hardware are you using exactly?

Nick
A2A Simulations Inc.

awreaper
Airman Basic
Posts: 9
Joined: 17 Dec 2015, 09:53

Re: Attitude Indicator - question

Post by awreaper »

I am using a Desktop Aviator board with some rotary encoders. I am using these for all the rotary knobs on the instruments, VOR1, VOR2, Altimeter, etc. and everything works fine except this pitch ladder.

User avatar
Nick - A2A
A2A Captain
Posts: 13764
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Attitude Indicator - question

Post by Nick - A2A »

I'm afraid I don't have any experience of using rotary encoders with FSUIPC. Is each complete rotation seen as a button press by the software? If so, that would explain the slow response rate.

For what it's worth I just tried using these 2 L:Vars assigned to joystick buttons and they worked fine. L:AttitudeIndicator=INC rotates the AI knob clockwise and lowers the orange pitch reference bars; L:AttitudeIndicator=DEC does the opposite. In each case a 'parameter' value of 0 seems to work fine. 'Control to repeat while held' was ticked.

Nick
A2A Simulations Inc.

awreaper
Airman Basic
Posts: 9
Joined: 17 Dec 2015, 09:53

Re: Attitude Indicator - question

Post by awreaper »

The rotary encoders work similar to a button. Lets say the PC reads then as button 10 and 11. When you turn the encoder one notch to the left it reads it as button 10 key press and when you turn it one notch to the right it reads it as button 11 key press. I will try mapping to another switch or button and see what happens.

User avatar
Nick - A2A
A2A Captain
Posts: 13764
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Attitude Indicator - question

Post by Nick - A2A »

Okay - sounds like the L:Vars should work fine with the rotary encoder in theory. However, as noted you might need to turn it a few times depending on how many notches per full rotation it gives you. With a control which works in this way, the 'control to repeat while held' setting wouldn't be advisable I guess.

Nick
A2A Simulations Inc.

new reply

Return to “C172 Trainer Tech Support”

Who is online

Users browsing this forum: No registered users and 2 guests