Jump to content
The simFlight Network Forums

Stock cessna 172 Garmin GNS 530/430 internal controls access?


cdub
 Share

Recommended Posts

I've been trying to duplicate the functionality of the stock msfs cessna 172 Garmin GPS com/nav frequency entry knobs.  I've wired up a couple of dual rotary knobs to act as the com/nav set knobs.  I then used the knob's push button with the flagged conditional feature of fsuipc to duplicate the normal gns 530 and 430 frequency setting behavior where active setting is swapped between com and nav using the same knob.   One thing I haven't been able to do is to have the sim highlight the com or nav lcd when either is being actively set.  I haven't run across any referrances to offset's or what not that would allow this to be changed when the focus has changed between com and nav.  Has access to these internals been discovered or published anywhere?

Functionally, it works but you have to remember which one is focused, which, when things get busy, adds pain.  I also just kind of want to see if I can get it working right. It's a want not a need, so no big deal if the info just isn't out there.

Link to comment
Share on other sites

5 hours ago, cdub said:

One thing I haven't been able to do is to have the sim highlight the com or nav lcd when either is being actively set. 

I thought this was done automatically when you set the com/nav buttons. How are you doing that?
You could try using hvars. These are the ones available for the GN530:
 

Quote

AS530_ENT_Push
AS530_MENU_Push
AS530_FPL_Push
AS530_DirectTo_Push
AS530_CLR_Push_Long
AS530_CLR_Push
AS530_MSG_Push
AS530_OBS_Push
AS530_VNAV_Push
AS530_PROC_Push
AS530_COMSWAP_Push
AS530_NAVSWAP_Push
AS530_RNG_Dezoom
AS530_RNG_Zoom
AS530_RightLargeKnob_Right
AS530_RightLargeKnob_Left
AS530_LeftLargeKnob_Right
AS530_LeftLargeKnob_Left
AS530_RightSmallKnob_Right
AS530_RightSmallKnob_Left
AS530_RightSmallKnob_Push
AS530_LeftSmallKnob_Right
AS530_LeftSmallKnob_Left
AS530_LeftSmallKnob_Push

and these for the GN430:
 

Quote

AS430_ENT_Push
AS430_MENU_Push
AS430_FPL_Push
AS430_DirectTo_Push
AS430_CLR_Push_Long
AS430_CLR_Push
AS430_MSG_Push
AS430_OBS_Push
AS430_PROC_Push
AS430_COMSWAP_Push
AS430_NAVSWAP_Push
AS430_RNG_Dezoom
AS430_RNG_Zoom
AS430_RightLargeKnob_Right
AS430_RightLargeKnob_Left
AS430_LeftLargeKnob_Right
AS430_LeftLargeKnob_Left
AS430_RightSmallKnob_Right
AS430_RightSmallKnob_Left
AS430_RightSmallKnob_Push
AS430_LeftSmallKnob_Right
AS430_LeftSmallKnob_Left
AS430_LeftSmallKnob_Push

 

To test them (before adding them), you can use the Add-ons->WASM->Execute Calculator Code... menu option.
So, for the GNS530, you can try to execute the following:
 

Quote

(>H:AS530_LeftSmallKnob_Push)

That should switch between Com and Nav/VLOC. and highlight the frequency that is controlled by the inc/dec knob..
If that works, you need to add an *.hvar file for the C172 (e.g. Skyhawk.hvar) containing the hvars you wish to use (preceded by 'H:') to the FSUIPC7 WASM folder (under modules). You can then trigger the hvar via either lua or using a macro - details are in the Advanced User Guide.

Link to comment
Share on other sites

On 6/25/2021 at 4:55 AM, John Dowson said:

I thought this was done automatically when you set the com/nav buttons. How are you doing that?
You could try using hvars. These are the ones available for the GN530:

This gets at the crux of the initial problem.  There isn't a way to push the 530 or 430 buttons or turn their respective knobs directly.  Those controls aren't in the generic fscontrols in fsuipc (or the simulator for that matter).  I have attached the knobs to the generic radio or nav fequency change.. eg Com Radio Fract Dec.  The only way I found to change what frequency the knob changes (com or nav) is to set up a flag on the small knob push and have the large or small knob control conditional on the state of the flag.  Sounds like there might be a way to actually push the knob on the panel gns 530 or 430 directly using hvars.  In which case that would then automatically have the normal activity of the panel knob.  Probably that's what I should have done in the beginning, just didn't know to look. 

It also sounds like it adds a level of complexity (with hvar files etc) that is quite a bit more than what I'm doing now so maybe just leave it as is.  Maybe at some point the left GNS530 430 panel knobs could be available similar to the way the generic gps buttons are in the controls list.  But then I can see the problem is that it's only specific to the one aircraft.

I'll look into triggering the hvar's with macros.  Might be worth the investment to then have a method to have access to the other panel device controls directly.

Link to comment
Share on other sites

14 minutes ago, cdub said:

It also sounds like it adds a level of complexity (with hvar files etc) that is quite a bit more than what I'm doing now so maybe just leave it as is.  Maybe at some point the left GNS530 430 panel knobs could be available similar to the way the generic gps buttons are in the controls list.  But then I can see the problem is that it's only specific to the one aircraft.

I'll look into triggering the hvar's with macros.  Might be worth the investment to then have a method to have access to the other panel device controls directly.

You can use the same hvar file with all aircraft that have a GN530/430 - just copy the file and rename it to a substring match of the aircraft (name/title) for which you wish to use it. You can also add any a/c specific hvars to each aircraft hvar file.
Once you have the hvar files, it is really quite easy to set up a macro file to use these, and then assign your button/switch/key to the hvar macro. 

You should just go ahead and try it. I can assist if you have issues.

Link to comment
Share on other sites

 
On 6/26/2021 at 9:08 AM, John Dowson said:

You can use the same hvar file with all aircraft that have a GN530/430 - just copy the file and rename it to a substring match of the aircraft (name/title) for which you wish to use it. You can also add any a/c specific hvars to each aircraft hvar file.
Once you have the hvar files, it is really quite easy to set up a macro file to use these

All right took me a bit, but got it.  I think what was missing for me is a few examples at hand so I'll go over mine.

The HVAR (text file ending in .hvar) file I made for the gps panels for the cessna 172 skyhawk is:

Skyhawk.hvar

     * the name of the file  (eg Skyhawk) must be somewhere in the name of the actual plane name in msfs, and it was case sensitive for me.

You have to put it in your Microsoft Flight Simulator Community folder.  That is not a trivial folder to find.  My installation is from steam and I found it here:

C:\Users\{your user name}\AppData\Roaming\Microsoft Flight Simulator\Packages\Community\fsuipc-lvar-module\modules

     * Other installations put it somewhere else by default so you may have to look for it or look it up online.

     * The AppData folder is a hidden system folder unless you've turned off hidden files in microsoft.  If you're attempting any of this, you likely have it off already.

     * There was an fsuipc-lvar-module folder in my Packages folder also for some well intentioned design purpose, so don't be beguiled.

Then you have to make a macro file (text file ending in .mcro).  This is my example, which has all of the above GNS 530/430 HVAR's described by John above.

_GPSPanel.mcro

     * I called it that only because it took me forever to get this working right, and I needed it to be at the top of the dropdown list during testing if it ever showed up.  Which it ... eventually did.

That file has to be put in your fsuipc7 program folder.  Mine was here:

C:\FSUIPC

After that, the first time you run fsuipc after installing that file, fsuipc will add the lines:

[MacroFiles]
1=_GPSPanel

in your fsuipc.ini file and the hvar's will be accessible in the drop down list in your button assignments with the file name, in this case _GPSPanel:  preppending the name of each HVAR and they will work to control the button's described by each HVAR name.  All of them I tested from the listings above work exactly as expected.

 

Link to comment
Share on other sites

8 hours ago, cdub said:

     * the name of the file  (eg Skyhawk) must be somewhere in the name of the actual plane name in msfs, and it was case sensitive for me.

Yes - I will update to a case insensitive match.

8 hours ago, cdub said:

That is not a trivial folder to find.  My installation is from steam and I found it here:

The easiest way to find this folder is by checking your FSUIPC7.log file, near the beginning the FS UNC path is logged, and the Community folder is under this - here is mine:
          313 10248 FS UNC path = "D:\MSFS2020\"
and my Community folder is D:\MSFS2020\Community

8 hours ago, cdub said:

     * There was an fsuipc-lvar-module folder in my Packages folder also for some well intentioned design purpose, so don't be beguiled.

That is where the FSUIPC_WASM.log file is located, as well as the user FSUIPC_WASM.ini. This is explained in the Advanced User Guide.

Thanks for the detailed description, which I'm sure will help others.

John

 

Link to comment
Share on other sites

  • 10 months later...

hi guys

so if I understood correctly i need to go under this process if i want to create y own g530...?

what if i use a usb card detected by fsuipc? the dfault buttons inluded in the list are working or do i steel ned to go through this hvar process (first tim i ear about btw)

apologies for my ignorance... trying to learm everyday with you people

Link to comment
Share on other sites

1 hour ago, ehemad said:

so if I understood correctly i need to go under this process if i want to create y own g530...?

what if i use a usb card detected by fsuipc? the dfault buttons inluded in the list are working or do i steel ned to go through this hvar process (first tim i ear about btw)

There is no need to use hvar files any more as you can activate all hvars using presets, either the provided MF presets or you can add your own. Please see the MobiFlight HubHop resource for a list of available presets (see https://hubhop.mobiflight.com/) - search for presets containing AS530 for the G530 presets.

FSUIPC7 will only detect USB joystick type devices. If your USB card is not if that type, FSUIPC7 will not recognise the buttons/switches natively (i.e. in the assignments panels). However, you may be able to use lua as this can detect non-joystick type HID devices - see the provided HidDemo.lua. Alternatively, you could try using MobiFlight (with FSUIPC).

John

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.