Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger multiple simconnect events with one button OR preset buttons for CJ4/Longitude Start/Stop buttons #111

Open
linmar22 opened this issue Dec 25, 2020 · 19 comments
Labels
enhancement New feature or request
Milestone

Comments

@linmar22
Copy link

Some planes, like the CJ4 and Longitude in MSFS have a start/stop button which performs multiple actions in the sim.
As far as I can tell TOGGLE_FUEL_VALVE_ENG1 (and 2) is one of them, still trying to figure out the other one.

It would be nice if the Generic Toggle Button could toggle multiple events in the sim to satisfy this use case.
Perhaps a text box of comma-separated events?

Another option would be to simply figure those events out on your end and add them to the list of actions for the Preset Toggle Buttons action.

@rmroc451
Copy link
Collaborator

Have you tried out the multi action button that streamdeck added?

@linmar22
Copy link
Author

linmar22 commented Dec 27, 2020

Fells more like a hack than a solution. Would it not make more sense for this to be part of the "suite"? That way the developer can control the gaps between fired events so they don't spam-kill the underlying SimConnect bridge as well as add a feature to the plugin, to keep it an AIO solution. SD's multi-action does not allow showing an on/off state or readout based on sim vars, so when a cockpit button is pressed, we don't see the state on the stream deck. No snark intended, just a proposition ¯_(ツ)_/¯.

@nguyenquyhy
Copy link
Owner

nguyenquyhy commented Dec 28, 2020

I have written a bit of my opinion on this in a reply in MSFS forum https://forums.flightsimulator.com/t/stream-deck-button-box-my-c172-implementation/229137/249. In brief, I think a SimConnect event should trigger panel logic, instead of the reverse implementation right now of any panel has a ton of logic and trigger a bunch of SimConnect events at the end.

Adding enough options in the button so that you can replicate all those panel logic would make the button feels extremely complicated (e.g. the push pull logic of A320 has all kinds of if/else), while adding no options for those logical variation might not be good enough.

However, since some already asked for multiple events for Generic Button, I have been keeping that feature in mind. I don't plan to rush on the feature though because right now we are working on some complicated features for the Generic Button (e.g. autocomplete, embed images), and I want to make sure the design for multiple events won't cause difficulty to our contributors or our users.

Also, can I check what you mean by "still trying to figure out the other one". It would be best if we know what we aim for.

@nguyenquyhy nguyenquyhy added the enhancement New feature or request label Dec 28, 2020
@linmar22
Copy link
Author

The Start/Stop button performs multiple actions in the plane, almost like a macro. Opening/closing the fuel valves is one of them - just need to figure out which other actions it performs, so the startup could be done entirely via StreamDeck.

@Guenseli
Copy link

Guenseli commented Jan 1, 2021

I support the request fully.

And I think I found out how it works currently:

Engine Starter Switch hast to be TOGGLE_STARTER1
(unfortunately there is no Starter variable we can read to show the switch state correctly)

RUN/STOP Button is a StreamDeck Multi-Action-Switch containing:

  • Flight Tracker Generic Toggle Button MIXTURE1_RICH
  • StreamDeck Pause
  • Flight Tracker Generic Toggle Button TOGGLE_FUEL_VALVE_ENG1

and

  • Flight Tracker Generic Toggle Button MIXTURE1_LEAN
  • StreamDeck Pause
  • Flight Tracker Generic Toggle Button TOGGLE_FUEL_VALVE_ENG1

Engine 2 is similar of course
Hope it works, haven't tested it under all circumtances

@linmar22
Copy link
Author

linmar22 commented Jan 2, 2021

Nice!
Edit: looks like the button state changes, but the engine doesn't start - guessing there's a third step.

@Guenseli
Copy link

Guenseli commented Jan 2, 2021

Have it tested again ...works here.

Besure, to change all numbers for engine 2, like TOGGLE_FUEL_VALVE_ENG1 and MIXTURE1_ to TOGGLE_FUEL_VALVE_ENG2 and MIXTURE2_

@Guenseli
Copy link

Guenseli commented Jan 2, 2021

Ah ok ... I see it now.

So, we both do talk about the WT Mod, just to be clear?

I had issues with my throttles. The above worked as long as I set my throttles in AAO as normal axis (should be similar in FSUIPC).
But the throttles wheren't moving/working then.

Changed now the throttles to AXIS_THROTTLE!_SET etc and now, the startup above does not work ;)

Will investigate

@linmar22
Copy link
Author

linmar22 commented Jan 2, 2021

In my case I'm trying on the Longitude - startup stops at 22% N2 and stays there, unless I turn that button to start via mouse.
I'm going to download SPAD.neXt and see if their SimConnect event monitor can shed some light on this.

@linmar22
Copy link
Author

linmar22 commented Jan 2, 2021

Looks like in the longitude, when I change engine 2 to RUN these events fire...

  • MIXTURE2_RICH
  • TOGGLE_FUEL_VALVE_ENG2
  • TURBINE_IGNITION_SWITCH_SET2:1

The starter is just TOGGLE_STARTER2

The same for the left engine... so a startup looks like this (last starter event fired twice because I clicked the button twice)

https://i.vgy.me/KmGBXy.png

Identical for the CJ4, so looks like the turbine ignition switch is what was missing!

@Guenseli
Copy link

Guenseli commented Jan 2, 2021

It is working in my case when I change Mixture_LEAN and Mixture_RICH

@linmar22
Copy link
Author

linmar22 commented Jan 3, 2021

Hmm.. side note here, but wonder why the turbine igintion switch event is coming from a different domain - MSFS in stead of SIMCONNECT...

@linmar22
Copy link
Author

linmar22 commented Jan 3, 2021

It's weird - TURBINE_IGNITION_SWITCH_TOGGLE works, but not TURBINE_IGNITION_SWITCH_SET and not TURBINE_IGNITION_SWITCH_SET1 or TURBINE_IGNITION_SWITCH_SET2. My guess is the MSFS: events are faked by the plane and not part of simconnect. Only problem is if I bind the _TOGGLE to both of my buttons RUN/STOP buttons, then I can only start one engine, since the second one will toggle the ignition to off.

I guess as a workaround right now, I could bind the turbine ignition switch to a separate button on the streamdeck.

Edit:
TURB ENG IGNITION SWITCH and TURB ENG IGNITION ON simvars don't seem to show anything either. Thanks, Asobo.

@pieterwasalreadytaken
Copy link
Collaborator

I'm not sure simply adding the number behind the variable is the way to go :)

@nguyenquyhy
Copy link
Owner

For "Set" events, you have to put the parameter in the Toggle parameter textbox instead of appending to the event names.

@linmar22
Copy link
Author

linmar22 commented Jan 7, 2021

Oh if only MS followed conventions! The event sniffer in the screenshot above shows the event names and parameters that were fired by the sim when clicking cockpit buttons.

@nguyenquyhy
Copy link
Owner

Ah I misread your previous log. The number is actually there for the engine index. Yeah I wish Asobo would stick to adding :index at the end of the variables/events for that.

About the MSFS: part, I believe it is just SPAD.next annotation for old vs. new SimConnect events. They are actually just SimConnect events.

I have also tried a bit with the events you mentioned on CJ4. MIXTURE2_RICH seem to change the button from STOP to RUN, TOGGLE_FUEL_VALVE_ENG2 starts the engine, while TURBINE_IGNITION_SWITCH_SET2 doesn't seem to do anything. Basically I can start the engine with the 1st 2 events.

@linmar22
Copy link
Author

linmar22 commented Jan 8, 2021

Guess the CJ4 doesn't need TURBINE_IGNITION_SWITCH_TOGGLE.
Longitude is the same a CJ4 except it needs that one as well. Mixture and fuel valve only allow it spool it up to a certain N1%, but it doesn't actually introduce fuel until you toggle the turbine ignition.

@nguyenquyhy
Copy link
Owner

I have added TURBINE_IGNITION_SWITCH_SET1 and TURBINE_IGNITION_SWITCH_SET2 in version 0.24. There is no solution for multiple events yet, but at least you can start up the Longitude now 😛.

@nguyenquyhy nguyenquyhy added this to the 0.46 milestone May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants