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

Added toggle field to GenericToggle, added a new toggle with 4 actions. #419

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mithrk
Copy link

@mithrk mithrk commented Jan 13, 2024

This adds one extra toggle to "Generic Toggle Button", and adds a "Generic Toggle Button 4" with 4 actions.

Useful for example in the TBM 930, where to turn on the landing lights the taxi lights need to be off and the light potentiometers need to be changed from 0 to 100.

Possibly also useful to set takeoff or landing configuration with a single button press.

While this build works for me on the Streamdeck +, I'm not a C# or HTML coder, and this proposal is more a proof of concept. I expect that the implementation is not optimal. A .streamdeck file is available on my branch to test. I've never used git before, but I wanted to share with other simmers. Please judge :)

mithrk and others added 2 commits January 13, 2024 12:27
This did not work with the toggles. and the TBM's lights are on a 3 way switch.

These settings are apparently also linked to the light potentiometers, and in addition to turning the landing lights ON, one must turn the taxi lights OFF with the same action, and also change the potentiometers 2 and 10.

To this end I added a toggle variable to GenericToggle, and added a new Generic Toggle where 4 actions can be defined.

In order to set the TBM's landing / taxi lights:
First button, 4 events  -  4 parameters:

LDG ON:

LANDING_LIGHTS_SET   -    1
LIGHT_POTENTIOMETER_10_SET  -   100
LIGHT_POTENTIOMETER_2_SET    -   0
TAXI_LIGHTS_SET                            -   0

Feedback value: LIGHT LANDING

TAXI ON:

LANDING_LIGHTS_SET    -   0
TAXI_LIGHTS_SET              -  1
LIGHT_POTENTIOMETER_10_SET - 0
LIGHT_POTENTIOMETER_2_SET   -  100

Hold Event:
TAXI_LIGHTS_SET     0

Feedback Value :  LIGHT TAXI

----------------------------------------------

This enables a single press to turn on Landing Light, a press on Taxi light to turn on Taxi light, and holding Taxi light down turns off the Taxi light.
This configuration mimics the 3 way switch in the TBM 930.

Tested on Steam Deck +

Also I have no idea what i'm doing, haven't worked with C# or HTML before, github is only a funny word to me, and I installed VisualStudio just because I wanted more actions on the button. For future reference to myself if I'm considering looking at an open source program - this took me 12 hours to figure out and I only *think* I figured it out.
Added info about build.dat
@mithrk mithrk changed the title Added toggle fields to GenericToggle, added a new toggle with 4 actions. Added toggle field to GenericToggle, added a new toggle with 4 actions. Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant