Cockpit Builders - Helpful control listings + cockpit view

Post any technical issues here. This forum gets priority from our staff.
Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by Gypsy Baron »

jmann wrote:How do you get the Nav 1 and Nav 2 buttons to toggle on and off on the audio panel? I have a Leo board and can get the marker, dme, and adf to toggle on and off but I can only seem to get the nav 1, nav 2 buttons to turn on with a button press but they will not toggle off. I have tried every fsuipc combination I can think of.
The NAV!/NAV2 audio functions are not TOGGLE variables as the marker, dme and adf are since the NAV audio also
depends upon the IDENT function being operable.

I use a separate button to switch them off. My C172.MCRO file is #16 so the codes below, CM16:53,0 and such
refer to MCRO file entries. Ignore the B66C0=6 entries as those are my conditional codes to implement multiple modes.
This group is 'Mode 6' ...I have 7 modes for the 172 controls. That is 7 unique controls assigned to each of my Saitek
dual throttle quad switches :)

The implementation uses a mix of FSX controls (Cxxxxx) and MCRO-defined L:Vars.

Code: Select all

7!==//------- Control Set 7 -----------------
90=B66C0=6 PD,14,C65837,1 ;// NAV 1 AUDIO AND IDENT ON
91=B66C0=6 PD,15,CM16:53,0 ;// NAV 1 AUDIO OFF   <--- NOTE the 3 functions here on the same key press (PD,15)
92=B66C0=6 PD,15,CM16:49,0 ;// NAV 1 IDENT  OFF 
93=B66C0=6 PD,15,C65832,0 ;// VOR1 IDENT  OFF
94=B66C0=6 PD,16,C65838,1 ;// NAV 2 AUDIO AND IDENT ON
96=B66C0=6 PD,17,CM16:54,0 ;// NAV 2 AUDIO OFF   <--- NOTE the 3 functions here on the same key press (PD,17)
97=B66C0=6 PD,17,CM16:50,0 ;// NAV 2 IDENT  OFF
98=B66C0=6 PD,17,C65833,0 ;// VOR2 IDENT  OFF
99=B66C0=6 PD,18,C65846,0 ;// ADF AUDIO TOGGLE
100=B66C0=6 PD,19,C66477,0 ;// MKR AUDIO TOGGLE
101=B66C0=6 PA,0,C65844,0 ;//DME TOGGLE
A section of my MCRO file for the kma26:

Code: Select all

49=L:Nav1PullIdent=SET
50=L:Nav2PullIdent=SET
51=L:kma26MkrSwitch=TOGGLE
52=L:kma26AdfSwitch=TOGGLE
53=L:kma26Nav1Switch=SET
54=L:kma26Nav2Switch=SET
55=L:kma26DmeSwitch=TOGGLE
56=L:kma26Nav1SwitchButton=TOGGLE
57=L:kma26Com1Switch=TOGGLE
58=L:kma26Com2Switch=TOGGLE
59=L:kma26Com3Switch=SET
60=L:ComPushButton=SET
61=L:kma26SelectorKnob_pos=SET
You could possible create a 'toggle-like' function using a Lua script, sending the ON codes on the first press
of your controller switches ans the OFF codes for the 2nd press.

Paul

Image

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by jmann »

Hey thanks for the response.

I guess this would have to be done via a lua script but I do not know how to create it and implement it. I'd use a button for the on function then use a second button for the off function, but can't seem to make that work either.

I tried all of this

Nav1 button - if (L:kma26Nav1Switch,bool) is zero, toggle default
(>K:RADIO_VOR1_IDENT_DISABLE) event
Nav2 button - if (L:kma26Nav2Switch,bool) is zero, toggle default
(>K:RADIO_VOR2_IDENT_DISABLE) event

Why is this in the .pdf if it doesn't work? I'm confused

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by Gypsy Baron »

jmann wrote:Hey thanks for the response.

I guess this would have to be done via a lua script but I do not know how to create it and implement it. I'd use a button for the on function then use a second button for the off function, but can't seem to make that work either.

I tried all of this

Nav1 button - if (L:kma26Nav1Switch,bool) is zero, toggle default
(>K:RADIO_VOR1_IDENT_DISABLE) event
Nav2 button - if (L:kma26Nav2Switch,bool) is zero, toggle default
(>K:RADIO_VOR2_IDENT_DISABLE) event

Why is this in the .pdf if it doesn't work? I'm confused
The above is not actual XML code. It is a description of the logic involved showing the variables.
These are are functions that are interdependent.

The actual code snippet would look something like this:
(L:kma26Nav1Switch,bool) == 0 if{ (>K:RADIO_VOR1_IDENT_DISABLE) }

But this would not work 'stand alone'. It would need to be in a properly formed XML gauge.

Separate switches for ON and OFF should work if you follow my example as they work for me.

The ON only needs one control code sent, C65837, but the OFF needs three control codes sent.
NAV1 AUDIO OFF, NAV1 IDENT OFF and VOR1 IDENT OFF.

Code: Select all

90=B66C0=6 PD,14,C65837,1 ;// NAV 1 AUDIO AND IDENT ON
91=B66C0=6 PD,15,CM16:53,0 ;// NAV 1 AUDIO OFF   <--- NOTE the 3 functions here on the same key press (PD,15)
92=B66C0=6 PD,15,CM16:49,0 ;// NAV 1 IDENT  OFF
93=B66C0=6 PD,15,C65832,0 ;// VOR1 IDENT  OFF
Paul

Image

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by jmann »

90=B66C0=6 PD,14,C65837,1 ;// NAV 1 AUDIO AND IDENT ON
91=B66C0=6 PD,15,CM16:53,0 ;// NAV 1 AUDIO OFF <--- NOTE the 3 functions here on the same key press (PD,15)
92=B66C0=6 PD,15,CM16:49,0 ;// NAV 1 IDENT OFF
93=B66C0=6 PD,15,C65832,0 ;// VOR1 IDENT OFF


This would do the trick indeed. what are the exact command names? I do not have a nav 1 audio and indent on or nav 1 audio off, vor1 indent off?

I have radio vor 1 indent disable,

Here is the button I want to use. 165=P101,0,C65832,0

So do I need to just copy and paste into my ini file?

166=P101,0,CM16:53,0
167=P101,0,CM16:49,0
168=P101,0,C65832,0

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by Gypsy Baron »

jmann wrote:90=B66C0=6 PD,14,C65837,1 ;// NAV 1 AUDIO AND IDENT ON
91=B66C0=6 PD,15,CM16:53,0 ;// NAV 1 AUDIO OFF <--- NOTE the 3 functions here on the same key press (PD,15)
92=B66C0=6 PD,15,CM16:49,0 ;// NAV 1 IDENT OFF
93=B66C0=6 PD,15,C65832,0 ;// VOR1 IDENT OFF


This would do the trick indeed. what are the exact command names? I do not have a nav 1 audio and indent on or nav 1 audio off, vor1 indent off?

I have radio vor 1 indent disable,

Here is the button I want to use. 165=P101,0,C65832,0

So do I need to just copy and paste into my ini file?

166=P101,0,CM16:53,0
167=P101,0,CM16:49,0
168=P101,0,C65832,0
You need to refer to my MCRO snippet and add the entries on lines 49 and 53 into YOUR MCRO file.
Then you need to change the "CM16" to CMxx where xx is the number of your MCRO file assigned by FSUIPC4
(that is listed in the FSUIPC4.ini file)
You would then also need to change the 53 and 49 to whatever the line numbers are for those entries in YOUR
MCRO file.


Those additional control functions ARE in the 172 audio panel so even though your panel doesn't have
them you still need to send the controls for the audio to function properly.

My code snippets are for reference, showing what needs to be done. The actual code depends upon what the
MCRO file line numbers and the MCRO file number are on your system. Everyones will be different.

Paul

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by jmann »

Updated see below
Last edited by jmann on 14 Dec 2014, 16:18, edited 1 time in total.

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by jmann »

We'll I thought I had it but can't seem to be able to get a button to push the radio nav ident back in unless i turn off the nav button on the audio panel. I'm still trying to figure out what my values would be using your method.

I can set nav1 audio and ident on in a single button press but can not get a value of any kind to turn it off.

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by jmann »

GOT IT!

Ok I had to sleep on it and come back and try again. I figured out what you meant by CM16.. My file has CM1.

Your "49" = my "49" which is L:Nav1PullIdent=SET
Your "53" = my "80" which is L:kma26Nav1Switch=SET it was #80 in my list.

So in fsuipc my button is on joy 101 button 2 and looks like this in the fsuipc.ini

179=P101,1,C65837,1
180=P101,2,CM1:53,0
181=U101,2,CM1:49,0
182=U101,2,C65832,0

I have to hit my "off" button 2x to get the nav1 light on the audio panel to go out. Any idea of how to get the ident switch and nav1 light on the audio panel to go off with one press instead of 2?


My list


[Buttons.A2A_C172R]
1=P5,8,C65752,0
2=U5,8,C65752,0
3=P126,16,CM1:63,0
4=U126,16,CM1:63,1
17=P174,7,CM1:38,0
18=U174,7,CM1:38,0
26=P174,6,CM1:37,0
40=P167,10,C65615,0
41=P167,9,C65607,0
42=P5,0,CM1:66,0
43=U5,0,CM1:66,1
44=P5,1,CM1:67,0
45=U5,1,CM1:67,0
48=P202,16,CM1:68,0
49=U202,16,CM1:68,1
57=P101,6,CM1:25,0
58=P101,5,C66477,0
69=P202,6,C66239,0
70=U202,6,C66239,0
71=P202,7,C66059,0
72=U202,7,C66060,0
73=P202,8,C66240,0
74=U202,8,C66240,0
75=P202,9,C66379,0
76=U202,9,C66379,0
77=P202,10,C66052,0
78=U202,10,C66053,0
79=P202,11,C66072,0
80=U202,11,C66073,0
81=P202,17,C66339,0
82=U202,17,C66237,0
83=P202,0,C66242,0
84=U202,0,C66242,0
85=P202,1,C66241,0
86=U202,1,C66241,0
87=P202,5,C66293,0
88=U202,5,C66293,0
89=R202,25,C66027,0
90=P202,24,C66026,0
92=P202,23,C66025,0
93=P202,22,C66024,0
94=R202,21,C66023,0
100=P1,22,CM1:71,0
101=P1,21,CM1:71,1
102=P1,20,CM1:71,2
103=P1,19,CM1:71,3
104=P1,23,CM1:71,4
105=P1,7,CM1:21,0
106=U1,7,CM1:21,0
107=P1,16,CM1:22,0
108=U1,16,CM1:22,0
109=P1,17,CM1:42,0
110=U1,17,CM1:42,0
115=P1,6,CM1:4,0
116=U1,6,CM1:4,1
117=P1,5,C65752,0
118=U1,5,C65752,0
119=P202,18,CM1:66,0
121=P202,19,CM1:67,0
123=P1,8,CM1:27,1
124=P1,10,CM1:78,0
125=P1,13,CM1:72,0
126=P1,15,CM1:74,0
127=P1,18,CM1:28,0
129=U1,18,CM1:28,0
130=P1,12,CM1:78,2
132=U1,13,CM1:72,0
133=P1,11,CM1:75,0
135=P1,9,CM1:76,0
136=U1,9,CM1:76,0
137=P1,14,CM1:77,0
138=U1,14,CM1:77,0
165=P101,0,C66465,0
167=P101,7,C65846,0
177=P101,3,C65832,0
179=P101,1,C65837,1
180=P101,2,CM1:53,0
181=U101,2,CM1:49,0
182=U101,2,C65832,0


179 on the list turns the audio button on and pulls the ident switch out.
180,181,182 pushes the ident switch in but I have but I have to hit the button 2x to get the light on the audio panel to go off too.

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by Gypsy Baron »

You indicated this:

Your "53" = my "80" which is L:kma26Nav1Switch=SET it was #80 in my list.

But your listing shows "53" instead of "80"

179=P101,1,C65837,1
180=P101,2,CM1:53,0 <---------------
181=U101,2,CM1:49,0
182=U101,2,C65832,0

I'll have to check my operation as to the light.

EDIT: I checked my setup and the press of my switch that sends C65837,1 causes the Nav1 IDENT
button to be pulled OUT and the Nav1 light on the Audio panel comes on.

Pressing my switch that sends the 3 commands causes the Na1 radio IDENT button to go IN and
the light on the Audio panel to go out.

Double check your MCRO file entries for the two L:Variables for spelling and format and check that your
P101 switch assignments are correct as to the CM1,xx numbering.

Paul

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by jmann »

Yeah looks like the 80 was not correct. Guess I had to much syrup on my bacon this morning haha. I'll double check it all again and report back. Sure wish this was more streamlined. Thank you so much for hanging with me on this.

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by jmann »

Double checked everything and nav 2 does the same thing. Have to push the off button 2x to get the light off. It's not a big deal. The main issue is to get the ident switch back in. A light on isn't going to ruin my immersion. Maybe it's the order.. Not sure but the spelling and format are correct. So in reality you wouldn't get nav aid audio even if you pressed the button on the audio panel without pulling the ident switch so it's as if I didn't press the audio panel button to extinguish the led.

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by Gypsy Baron »

The only thing I see that MAY be causing this issue is the ,settings for these lines:

181=U101,2,CM1:49,0
182=U101,2,C65832,0

In my setup, I send all 3 controls on the PRESS of the switch/button. You are sending one on the press
and these two on the release.

Try changing your code to this:

181=P101,2,CM1:49,0
182=P101,2,C65832,0

and see if there is any difference in the operation.

Another thought. You indicate that your MCRO line numbers for the two items are 49 and 53.
Are there entries between those two?

Post the contents of your MCRO file here so I can have a look at it, but try that change to
the two lines above and report on the results.

Paul

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by jmann »

This fixed the issue. What does P and U stand for?

181=P101,2,CM1:49,0
182=P101,2,C65832,0

Nav1 and 2 work perfectly now. Thank you very much. I'm sure this post will help others.

Nav1
179=P101,1,C65837,1
180=P101,2,CM1:53,0
181=P101,2,CM1:49,0
182=P101,2,C65832,0

Nav2
183=P101,3,C65838,1
184=P101,4,CM1:54,0
185=P101,4,CM1:50,0
186=P101,4,C65833,0

Gypsy Baron
A2A Master Mechanic
Posts: 3396
Joined: 02 Aug 2008, 17:04
Location: San Francisco

Re: Cockpit Builders - Helpful control listings + cockpit vi

Post by Gypsy Baron »

The "P" indicates an action when a switch or button is pressed.

The "U" indicates an action when a switch or button is 'un-pressed', released. :)

Glad it is working for you now.

Paul

Image

User avatar
jmann
Airman First Class
Posts: 62
Joined: 20 Nov 2013, 14:42

Help with 360 Degree Hall Sensor for trim wheel

Post by jmann »

Hey guys I have another small programming question. I have a real c172r pedestal and setting it up with a real trim wheel. So for the axis control I'm using a Hamlin 55300 360 degree Hall Sensor http://www.hamlin.com/specsheets/55300xxxxx.pdf

I epoxied the actuator magnet to the shaft of a real c172 trim wheel and mounted it and the hall sensor into position. Everything works perfectly in sim except for a small issue.

Once I trim either up or down all the way and keep turning the trim wheel.. the axis resets back to 0. What I mean is if I say trim all the way down and keep going the trim will reset back to full up trim and start working its way back down. Is there a way to program fsuipc to stop the axis at full trim defection in both up and down positions? Not a major issue but have to be mindful to stop trimming or I will all of a sudden have complete opposite trim.

Don't want to have to build a stop block to keep the sensor form flipping.. trying to do it via software to limit the axis so I have to start trimming the opposite direction.

I'm using a Leo board and have it plugged into the "Dial" axis. Wrong board for this? Do I need something like this http://www.desktopaviator.com/Products/ ... /index.htm

[Edit] Disregard Above. Made a stop block to solve the issue.

new reply

Return to “C172 Trainer Tech Support”

Who is online

Users browsing this forum: No registered users and 12 guests