Most of the commonly reported issues and questions are answered in the Frequently Asked Questions (FAQ) option under the Support menu of this website.
*** PLEASE NOTE ***
Your forum account is not the same as the account used in the shop. They are completely separate accounts.
1st December: A new version of the GoFlight Interface Tool for MSFS is now available.
12th November: A new version of the GoFlight Interface Tool for X-Plane is now available.
6th June: A new version of Virtual Flight Sim Hardware is now available (huge update)
21st November: A new version of the GoFlight Interface Tool for FSX/FSXSE/P3D is now available.

Rotary Action Acceleration - X-Plane

Hi Steve,

Normally acceleration of a Rotary is set by selecting Rotary Action: ROTATE. This works very well for standard datarefs like sim/autopilot/heading_up.

However, on some payware, rotaries can only be mapped to custom bespoke events to change instrument settings. One example is on the LES Saab 340A. To map the NAV1 OBS, bespoke events need to be defined. For example:
BE_SAAB340A_VOR_OBS1_DIAL_INC    (BE name)
LES/saab/autopilot/CHP/OBS1_dial += 1   (BE action)

The problem I have found is that when a bespoke event (such as BE_SAAB340A_VOR_OBS1_DIAL_INC) is mapped to Rotary (RP48R), it cannot be accelerated via Rotary Action: ROTATE (like the standard XP commands can).

The only workaround seems to be:
LES/saab/autopilot/CHP/OBS1_dial += 2

This gets the OBS moving at double the speed, but loses some granularity in what OBS can be selected.

Is there a way to accelerate custom bespoke event based Rotary Events that work by increment of custom datarefs? Rotary Action: ROTATE seems ineffective in this case.

Thanks.

Comments

  • Update:
    I have found that the standard command:
    sim/radios/obs1_up
    will work and (being a command) can be accelerated via Rotary Action: ROTATE

    However, the use of the standard command does not trigger the animation in the cockpit (CRS dial is not visibly turning). Only LES/saab/autopilot/CHP/OBS1_dial will trigger the dial animation.

    It would be great if custom defined events could also be accelerated.
  • Commands are processed within X-Plane so they always have up-to-date DataRefs to run against. Bespoke Events run outside of X-Plane and access DataRefs via a shared memory area between GIT and the GIT plugin.

    So when a task sends an update to a DataRef, the command is processed by the plugin and then the shared memory area is updated. This happens extremely fast but there is a delay non the less.

    The Rotate function is also operating extremely fast so many of the task updates on a DataRef are actually just setting the DataRef to the same value because the shared memory area has not yet been updated.

    The trick is to add a Sleep task before or after the Set task to give the GIT Plugin chance to update shared memory. You want the Sleep task to use a very small number (its in milliseconds), so try a few values until it works better

    Best wishes

    Steve

  • The shared memory latency explains a lot. I have added a sleep of only 4 ms and changed to ROTATE and it seems to be working better. Thanks.
  • That Saab is another one that uses Gizmo as well. 
    The acceleration doesn't work too great with Gizmo aircraft. 

    The trick I've found is to use the dataref that actually controls the animation in the VC then I believe it will use the acceleration that the developer implemented. If you use DRT or DRE you will find that many times there are multiple instances of a dataref that can control  an rotary , usually the default XPX dataref will not make the dial spin in the VC of payware aircrafts.
    Steve McNitt
  • I have spent quite a lot of time with the Saab. Sometimes changing the animation by itself will move the dial but have no effect underneath. I got some switches and knobs working with the Saab, but not all. The ones I could not get working included:

    1) Changing the transponder mode STBY<-->ALT. In this case, I changed every dataref that GIT detected as "changed", but still the mode would not change

    2) The autopilot mode buttons (like NAV) that have a small yellow LED light up when clicked. Once again I defined a bespoke event to change every dataref that changed with no joy. I tried to map these buttons to my RP48B.
  • Did that team provide a datarefs.txt and a list of the commands( that you map to buttons in XPX)? You may find that if they have commands implemented then those are the best thing to use.

    I've found with some developers (especially the ones using Gizmo) is that  instead of a dataref directly manipulating a button of switch,  the datarefs are just 1 piece of it, then they make a macro or something inside of gizmo with LUA.

    So for example  a VNAV button like on the MCPPro , would be broken into 4 parts....1 dataref for the VC animation of the button, 1 to fire the sound, 1 to make the little light inside the button illuminate and one dataref that tells the AP system VNAV turned on.  Gizmo is used to tie all 4 together when the user clicks the button but in the case of cockpit builders it is a very unfriendly way to make things work. 

    In that case we are left to basically rebuild the same functionality within GIT to make it work.....or maybe they were nice enough to make it a command.

    Unless the developer set out to make it easy for hardware users from the start then it turns into a royal PITA to interface some aircraft.

    I have 1 in particular on FSX that is the same way, the Milviz 737. I can get all the buttons and lights and VC animations working but some stuff still doesn't work. I work on it for a bit, get mad and set it aside for another day  :P 
    Steve McNitt
  • edited August 2016
    BTW I did invent another method for acceleration before Steve made it work better in XPX.

     What I did was to increment a bespoke variable on every click to the rotary,  then in my bespoke event I read that bespoke variable and if it goes over an arbitrary number like 10 clicks the event will increment the dataref by double what it normally does and then reset the bespoke variable back to 0.  If you set the number too low then it will accelerate when you dont want it to 

    Poor man's acceleration :P 

    I don't think I have any examples left of that code though cause I removed it all once Steve fixed the acceleration.
    Steve McNitt
  • Thanks for all that good info. I might post a message on the saab forums about any custom commands or datarefs.txt.

    Just to clarify, if the Saab team does provide some custom command in a datarefs.txt will GIT pick that up and offer it as a selectable option?
  • Hi Martin

    I do have the mcp pro working for the saab, including all AP modes buttons (nav, ias, hdg, etc) illuminated when active. 
    I also have all rotaries IAS, CRS1, CRS2, ALTITUDE, VS DIAL, working just fine.

    If you are still unable to get it to work let me know, i can share you here my profile for you to import and test it.
  • Hi Mmerelles,

    If you like I could add your config to the downloads section of the website. Provide the aircraft name and your full name as well so I can credit you.

    Best wishes

    Steve

  • Hi Steve,

    Yes, will do! This is great about your goflight app. Sharing profiles between the community. I will upload the saab profile when back at home later today.

    regards
    Manuel
  • Steve

    Here is the LES SAAB340 for xplane, MCPPRO.

    regards
    Manuel Merelles


  • Thanks Manuel. I don't own a MCPPRO, but hopefully I can use your configs as a basis for mapping my RP48.
Sign In or Register to comment.