Flapsfullsend Posted May 7 Report Posted May 7 Just getting my legs under me with pilotsdeck / fsuipc. With devmode and hubhop I was able to figure out some basics. Things fell apart trying to setup my streamdeck+ for the Grand Duke starter however. I don't really know what I'm looking at here but if anyone could help point me in the right direction I'd really appreciate it. The magneto rotary has 4 positions with (0 off, 4 start) and I am able to set the positions without issue. The problem is that the sim (MSFS 2024) seems to only actually run the starter with a mouse click+drag+hold using the code below. Ultimately I'd like to put that into a pilotsdeck composite action but not sure where to even start. (M:Event) 'WheelUp' scmi 0 == if{ (L:BKSQ_IgnitionPosition_1, number) 4 < if{ (L:BKSQ_IgnitionPosition_1, number) 1 + (>L:BKSQ_IgnitionPosition_1, number) } (E:SIMULATION TIME, seconds) (>L:starterKnobReturnTime_L, number) } els{ (M:Event) 'WheelDown' scmi 0 == if{ (L:BKSQ_IgnitionPosition_1, number) 0 > if{ (L:BKSQ_IgnitionPosition_1, number) 1 - (>L:BKSQ_IgnitionPosition_1, number) } } els{ (M:Event) 'Lock' scmi 0 == if{ (M:RelativeX) (>O:_LastX) } els{ (M:Event) 'Unlock' scmi 0 == if{ 0 (>O:_LastX) } els{ (M:Event) 'LeftDrag' scmi 0 == if{ (M:RelativeX) (O:_LastX) - sp0 0.008 0.07 0.05 3 (M:InputType) case (>O:_InputThreshold) l0 abs (O:_InputThreshold) > if{ l0 (O:_InputThreshold) / abs flr sp1 l0 (O:_InputThreshold) % abs sp2 :1 (* for loop *) l1 0 <= if{ g2 } l1 -- sp1 l0 0 > if{ (L:BKSQ_IgnitionPosition_1, number) 4 < if{ (L:BKSQ_IgnitionPosition_1, number) 1 + (>L:BKSQ_IgnitionPosition_1, number) } (E:SIMULATION TIME, seconds) (>L:starterKnobReturnTime_L, number) } els{ (L:BKSQ_IgnitionPosition_1, number) 0 > if{ (L:BKSQ_IgnitionPosition_1, number) 1 - (>L:BKSQ_IgnitionPosition_1, number) } } g1 :2 l0 0 > if{ (M:RelativeX) l2 - (>O:_LastX) } els{ (M:RelativeX) l2 + (>O:_LastX) } } } } } } } quit
John Dowson Posted May 8 Report Posted May 8 Presumably you use the lvar BKSQ_IgnitionPosition_1 to move the position of the switch, no? Does this have any actual affect on the starter, besides moving the magneto rotary? I am not that familiar with such complex gauge calc code, but it looks like you also need to set the starterKnobReturnTime_L lvar when you do this. You can set both lvars using a calculator code preset. The rest of the code is setting O-type (component) variables which I am not familiar with. Are any other (standard) events or input events logged (in FSUIPC log / console) when you move the starter in the VC? If its just a matter of holding the magneto rotary in one position for a certain amount of time before changing the position back, you could do this by writing a macro or lua script. But its probably more complicated than that. You could try asking the community if its possible to create a preset to replicate that code. The best place for this type of question would be on the MF Discord server, in the MSFS2024 channel. Sorry but I don't have this aircraft so cannot really look into this in more detail. John
John Dowson Posted May 20 Report Posted May 20 Did you manage to find anything for this? Just noticed this post on the MF discord server: Quote I can't find how to control Black Square Duke's variables for the following: Fuel pumps (L and R) Starters / Gen L and R Igniotion Auto / On L and R Condition levers - somehow normal usage mapping joystick axes doesn't work for me... with response: Quote Fuel Pumps - L:var_FuelPumpSwitchL / L:var_FuelPumpSwitchR / Values 0/1/2 Starters - L:var_StarterGenSwitchL / L:var_StarterGenSwitchR / Values 0/1/2 Ignition - L:var_IgnitionSwitchL / L:var_IgnitionSwitchR / Values 0/1/2 Condition Lever - L:BKSQ_ConditionLever_1 / L:BKSQ_ConditionLever_1 / Values 0/1 But that is for the MSFS2020 version. If those lvars exist in MSFS2024, you could try them. Also, check the aircrafts documentation - look at the section Primary Control Variables which seems to list all the lvars available, e.g.: Quote Left Ignition Switch L:var_IgnitionSwitch_L 0 = ON, 2 = AUTO Right Ignition Switch L:var_IgnitionSwitch_R 0 = ON, 2 = AUTO Left Starter-Generator Switch L:var_StarterGenSwitch_L 0 = GEN, 2 = START Right Starter-Generator Switch L:var_StarterGenSwitch_R 0 = GEN, 2 = START Left Fuel Pump Switch L:var_FuelPumpSwitch_L 0 = WING, 2= AUX Right Fuel Pump Switch L:var_FuelPumpSwitch_R 0 = WING, John
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now