Matching switch positions with hardware through commands [XP]

Help creating logic scripts for Air Manager Instruments

Moderators: Ralph, russ

Post Reply
Message
Author
User avatar
BradyBrother100
Posts: 51
Joined: Tue Oct 13, 2020 4:21 pm
Location: United States MDT

Matching switch positions with hardware through commands [XP]

#1 Post by BradyBrother100 » Thu Mar 25, 2021 3:11 pm

Hi! Is it possible to match my toggle switch with the switch in the game using commands? This would be used for the Seat Belt signs in the Zibo 738 since the dataref isn't writable and so that the center position of the switch is matched no matter if the switch came from the up most position or the bottom most position. I can't assign the middle position to "laminar/B738/toggle_switch/seatbelt_sign_dn". While that would be great for when the switch comes from the up most position, it would break when the switch comes from the bottom most position.


Thanks!
Brady
Last edited by BradyBrother100 on Thu Mar 25, 2021 11:36 pm, edited 1 time in total.

User avatar
Ralph
Posts: 5151
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Matching switch positions with hardware through commands [XP]

#2 Post by Ralph » Thu Mar 25, 2021 5:42 pm

There's a toggle command for it. What you can do is trigger the toggle command when the switch is in a different position than the simulator. But you need to do this within a timer callback, because else it might just start toggling out of control. The C90 has the same problem with a lot of switches, the datarefs aren't writeable and there're only up and down commands. I didn't manage to get that working reliably, but a toggle might work.

User avatar
BradyBrother100
Posts: 51
Joined: Tue Oct 13, 2020 4:21 pm
Location: United States MDT

Re: Matching switch positions with hardware through commands [XP]

#3 Post by BradyBrother100 » Thu Mar 25, 2021 6:45 pm

Great Idea but the Zibo doesn't have a command to toggle the seat belt signs, emergency lights, or the landing lights independent of one another. With the Emergency Exit lights, you can turn the off which is the up most position, and then there are the up/down commands. With the landing lights, you can only turn them all on or turn them all off, you can't control them independently.

User avatar
Sling
Posts: 4504
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Matching switch positions with hardware through commands [XP]

#4 Post by Sling » Thu Mar 25, 2021 9:15 pm

Brady,

We need more information. What when asking questions like this, I know we have some of this now but in the initial question it’s always worth saying what sim, aircraft and control it’s for. What datarefs and/or commands are relevant and a description of the issue or query and how you would like it to work. It saves someone who may be able to help you having to guess and dig around. They may be able to simply say that’s not possible or even better post you a snippet of code to achieve what you need.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests