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

Need to send a parameter: On the Airbus, there are two modes for each AP setting #46

Open
Virtual-Chris opened this issue Nov 3, 2020 · 14 comments
Assignees
Labels
enhancement New feature or request

Comments

@Virtual-Chris
Copy link

On the A320 Airbus, each Autopilot Mode (SPD, HDG, ALT, VS) has two states: managed mode (push the dial in) and select mode (pull the dial out).

According to the thread below, there are four events that can be used to select these modes... sending a "2" puts it in managed mode, a "1" in select mode

HEADING_SLOT_INDEX_SET
SPEED_SLOT_INDEX_SET
ALTITUDE_SLOT_INDEX_SET
VS_SLOT_INDEX_SET

https://forums.flightsimulator.com/t/airbus-neo-is-there-a-binding-to-switch-between-managed-and-selected-modes/244977

I guess there's two ways to implement this... allow us to pass a parameter on a generic toggle button. OR, implement a new button type for this that sends a "1" on a simple press (simulating pulling the button) and a "2" when holding (simulating pushing the button).

Can you please implement one of these - I'll take whatever is easier. But unless I can get this working, the stream deck is useless for A320 AP functions.

@nguyenquyhy nguyenquyhy added the enhancement New feature or request label Nov 4, 2020
@nguyenquyhy nguyenquyhy self-assigned this Nov 4, 2020
@nguyenquyhy
Copy link
Owner

Yes I agree the plugin does not work well with Airbus at the moment. I'll take a look into the events you listed above.
Thanks for the information.

@Virtual-Chris
Copy link
Author

Any love?

@nguyenquyhy
Copy link
Owner

Any love?

A lot 😂. Maybe a bit too much.

I have been trying to make the buttons better on the Airbus on both the triggering and the display side (and the +/- buttons). Due to the very different way the Airbus AP operates (e.g. there is no turning off a mode on its own; you have activate an another AP mode instead), it took me quite a bit of time to do some experiments and reading to understand how the variables works.

I am thinking of an Airbus mode where the button will change its behavior when an Airbus is selected (or maybe a manual switch?). Hopefully I'll be able to finish this this weekend 😄.

@Virtual-Chris
Copy link
Author

Ha... Awesome. Or maybe just a different set of button types that are compatible with the Airbus? I was thinking I would ultimately need one button to be the equivalent of pushing a knob. And another button to be the equivalent of pulling the knob. So for each of speed, heading, and altitude you would need, increment, decrement, push and pull on the Stream Deck. Regardless, I’m really looking forward to what you come with.

@nguyenquyhy
Copy link
Owner

In version 0.16, I have added a new parameter setting for generic buttons to allow you to add parameter to toggle events.
I have also added the events you listed on top for generic buttons. However, if you test those events out, you might get quite unexpected behavior in the A320. In brief, when you push/pull button in the flight deck, the panel does a bunch more thing than just switching managed/selected.

Some examples:

  • Pulling HDG sets Selected heading to current heading and switches HDG to Selected mode
  • Pulling/Pushing ALT sets Selected/Managed altitude to the display altitude, activates (OP) CLB/DES, and switches ALT to Selected/Managed mode.

The parts in bold are the ones you won't see when triggering the events alone (with generic buttons). I am still consolidating all the info on this, but basically I don't think generic buttons would work very well. The A320 AP Panel also involves several local variables that are not exposed via SimConnect and might need a custom in-game mod to extract those out.

@Virtual-Chris
Copy link
Author

Virtual-Chris commented Nov 23, 2020

So I tried this out tonight. Thanks for your effort on this!

As you point out, the ALTITUDE_SLOT_INDEX_SET to 2 for managed mode, is not the same as pushing the button on the aircraft. :( Although it seems to toggle managed mode on, if it was off, it doesn't seem to get the aircraft to open climb to the new altitude. You still need to push the button in with the mouse. I don't know if there's anyway you can create a custom button to remove the need to push this button with the mouse? If so, that would be amazing as this is by far the most used control when flying in the A320.

The Speed works as expected, toggling in/out of managed/select mode works fine. Heading mode is also ok as it is (rarely used in select mode with the poor ATC we have that doesn't provide vectors).

Vertical speed is broken but that's a SimConnect issue. The old Preset Toggle for VS that you have works fine but I rarely need VS in the Airbus as managed mode takes care of the proper climb and descent rates.

One last thing... is there any way to get a value back from SimConnect as to what mode these are in? So I can show it on the Stream Deck if it is in managed or select mode? It's not a big deal as the AP display is at the top of the cockpit dash anyway, so it's not a big issue.

@Virtual-Chris
Copy link
Author

Here's my AP setup for the A320, meant to mimic the real console as best I can. The button with the image of the real button is the "pull" (down) select mode. The display strip across the top is the "push" (up) managed mode. If anyone wants the icon set, I'm happy to share.

A320 AP

@nguyenquyhy
Copy link
Owner

Although it seems to toggle managed mode on, if it was off, it doesn't seem to get the aircraft to open climb to the new altitude. You still need to push the button in with the mouse.

Yup I am trying to find out how to trigger CLB/DES, but so far I can't find anything yet.

The Speed works as expected, toggling in/out of managed/select mode works fine. Heading mode is also ok as it is (rarely used in select mode with the poor ATC we have that doesn't provide vectors).

Speed and Heading works much better than Altitude, but they have some discrepancy such as the value you see once you switch to Selected is not your current AS/Heading, and you cannot preset the value and then trigger Selected mode. I put a full summary at #65.

Vertical speed is broken but that's a SimConnect issue. The old Preset Toggle for VS that you have works fine but I rarely need VS in the Airbus as managed mode takes care of the proper climb and descent rates.

I don't even understand how the V/S in A320 should work (both the default and 32NX mod). It feels very weird to me, but maybe just bug with current Airbus. 😂

One last thing... is there any way to get a value back from SimConnect as to what mode these are in?

Yes:

  • AUTOPILOT SPEED SLOT INDEX
  • AUTOPILOT HEADING SLOT INDEX
  • AUTOPILOT ALTITUDE SLOT INDEX

@Kaledozor
Copy link

Here's my AP setup for the A320, meant to mimic the real console as best I can. The button with the image of the real button is the "pull" (down) select mode. The display strip across the top is the "push" (up) managed mode. If anyone wants the icon set, I'm happy to share.

A320 AP

Excellent work !!
I would like your icons and profiles to see how you configured all this on the 320.

@Virtual-Chris
Copy link
Author

Here's my profile and button images... https://drive.google.com/file/d/1LGMpEMWUqccfRpkM0nGEacVDVnC5K5yG/view?usp=sharing

@nguyenquyhy
Copy link
Owner

Just FYI for those who are interested in shared profiles, right now for ON/OFF images, only the paths to the images are stored in the profile instead of the image itself. This makes the profile a bit lighter and editing the images will automatically update the button. However, this is not very user-friendly for shared profiles; basically you have to put the images in the same path of the exporter.

I am working on a new feature to embed to ON/OFF images into the buttons itself, allowing those images to go along with profile export. I am a bit concern if Stream Deck has any size limit on the profile size, but since I don't see any mention about that, I hope there is no limits.

Once the feature is released (soon), I'll start to collect community profiles to put in this repository for everyone to try out, so any contribution is very welcome!

@rmroc451
Copy link
Collaborator

Excellent idea @nguyenquyhy !

If size does become a concern, have you given any thought to storing a relative path out to the icon(s) on the button (eg ....\ICONS\icon.png) when you upload/pick one?

Then we could plunk icons in a zip and share that way.

I'm all for embedding, if that yields the outcome you desire! I'm excited to see how you accomplish this.

@Virtual-Chris
Copy link
Author

Ok, in that case, sharing my profile is unlikely to be helpful.

@Guenseli
Copy link

Guenseli commented Jan 3, 2021

Sorry if I may ask, but maybe I have probably overseen sth ...
Is it now possible to enter 2 values?

I have the problem for example with AVIONIC_MASTER_SET which I need
This is working with AVIONIC_MASTER_SET Parameter 1 and 0

so, I see the field toggle parameter and it works, but a second one (in that case for 0 ) would be really helpfull.
There are some other situations we could need this!

many thanks!!!

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