#X-Plane 12 Default Laminar G1000 CLR Button long press

1 messages · Page 1 of 1 (latest)

gray fog
#

I need some help ive been using the G1000 in the colimata concorde (which i believe is just the default XP12 Laminar G1000) a bit recently and i tried to bind the buttons which generally wasnt a problem except i cant seem to get the hold on CLR to return to default to work anybody got any ideas?
The DataRefTool doesnt find any other functions and the Screenshot shows my bind
Mobiflight 10.5.3.12 (BETA)

river arrow
#

this is likely a limitation in how mobiflight communicates with xplane. xplane commands have three states Press, Release & Once which is a press followed immediatly by a release. Mobiflight can only trigger the Once state so the sim is unable to detect that you are holding the button down. you can use vjoy or a flywithlua script as a workaround if you wish to bind the action in mobiflight.

dark belfry
gray fog
dark belfry
harsh sable
#

yeah the xplane network API does not allow "hold". Either vjoy or Lua (to create separate PRESS and RELEASE commands) are the way to go.

gray fog
#

Hm never done that could somebody link me a guide/tutorial by chance?

harsh sable
#

There is an old post in the archived xplane channel

#

maybe we have a wiki page of this, but

#

This was made by @dry vine a while ago, re-posting it here.

-- This script made by Samer for the C172
-- to simulate starter with "command press" mode


function StarterOnPush()
    command_begin ("sim/ignition/engage_starter_1") 
end

function StarterOnRelease()
    command_end ("sim/ignition/engage_starter_1") 
end


create_command("FlyWithLua/C172/StarterOn_Push","push the starter","StarterOnPush()","","")
create_command("FlyWithLua/C172/StarterOn_Release","release the starter","StarterOnRelease()","","")

gray fog
#

Will look into it later once im home but if i can take a bit more of ur time ive never done a script like that is that done in MF or in vjoy?

dark belfry
gray fog
#

Will check out later

harsh sable
#

I actually had a wild idea

#

Since there is the limitation with xplane network api that mobiflight uses, that only allows you to invoke a command but cannot do command start and command end separately,

What if there was a flywithlua script that handles the following from MobiFlight:

  • OnPress: set a custom dataref "command_name" to the string of the desired xplane command string.
  • OnRelease: set the dataref to 0.

The script would then monitor the dataref for changes, and if it is "not 0", issue a command_begin, treating the contents of the custom dataref as the command to invoke. It would also store the value of the dataref temporarily while the command is being started.

And if the value of the dataref changes to 0 (our OnRelease), it would issue command_end for the previously stored command. And the value would be 0, allowing for a next command to run later.

I think this might work? It would have the limitation that you can only invoke only command, although I guess nothing would prevent doing this with a FIFO array schema perhaps to run multiple commands at the same time? But as a proof of concept even one would be intresting to try.,

gray fog
#

hm do i need to do more? had vjoy installed b4 and i can only add the joystick ID ThinkZed

river arrow
harsh sable
#

yeah since vJoy is a virtual joystick, it of course shows up as a valid input device too

#

even though it doesnt make sense there

#

You can actually disable vjoy from Settings > Peripherals so it is not listed as a valid input, since it doesnt really make sense there, only as an Action Type

gray fog
#

Okay yeah guess i got somewhat confused by the guide

harsh sable
#

its a lot of new concepts at once, no wonder

gray fog
#

I think i just thought that you create somewhat of a preset and reference that later or something

gray fog
#

maybe im still missing somethign but i did set the CLR button as a vjoy input on and off hold and then referenced that vjoy input for the CLR action and it does the normal clickaction but not the hold ThinkZed

river arrow
#

Did you bind the vjoy button in the sim?

gray fog
# river arrow Did you bind the vjoy button in the sim?

you will laugh... i totally didnt even think about the native control setup CleveDerp so used to using MF that i forgot the G1000 is the default XP12 one so i.... bound the CLR button ingame and that works with hold no MF needed x_oof

harsh sable
#

oh heh 😄

#

yeah that happens sometimes, dont worry