shorthauler Posted April 6 Report Posted April 6 I am trying to set up a "PilotsDeck - A StreamDeck Plugin" profile for the DIGITAL DAKOTA WORKS DC-3 / C-47. There are switches that work through Event IDs such as 66241 (TOGGLE_MASTER_BATTERY). If I send this Event through PilotsDeck, it does toggle the master battery, but the switch does not move. With other switches such as the light switches, it is different. They do move. I suspect that this is coded with the aircraft and probably cannot be changed, but I wanted to check here whether this might be a known phenomenon. I have also experienced similar issues with other aircraft (Alabeo C421). It might be something related to switches with more than one (three) position(s). Best regards, - shorthauler
John Dowson Posted April 7 Report Posted April 7 22 hours ago, shorthauler said: If I send this Event through PilotsDeck, it does toggle the master battery, but the switch does not move. This usually indicates that something else is needed - a H or L var, or maybe an Input Event. I don't have the DIGITAL DAKOTA WORKS DC-3 / C-47 so can't really help with this, sorry. Try listing the lvars and input events to see if anything looks applicable. Otherwise, you can inspect the battery switch using the MSFS behaviors windows to see how it works and try and replicate that - see https://www.badcasserole.com/uncovering-input-events-using-the-msfs2020-model-behavior-dialog/ (for MSFS2020) or https://www.badcasserole.com/uncovering-input-events-using-the-msfs2024-model-behavior-dialog/ (for MSFS2024). Alternatively, ask on the MF MSFS2020 discord channel to see if anyone can provide a preset for you. 22 hours ago, shorthauler said: I have also experienced similar issues with other aircraft (Alabeo C421). It might be something related to switches with more than one (three) position(s). There should be no issue with switches that have more than one position, but toggle controls will not work with such switches - or may only control the movement between two positions. All aircraft are different in MSFS2020/2024 for most controls, especially add-on aircraft, and you need to determine what works for each aircraft, John
shorthauler Posted April 13 Author Report Posted April 13 Thanks a lot for your answer, John. The DC-3 is running on FSX, so it might be a bit more difficult finding the Lvar than it is in MSFS. There is an XML file that seems to contain Lvars, but if I send this to FSX: ipc.writeLvar(“L:Electrical master battery”, 0) I am getting an error message: Quote *** LUA Error: E:\FSX\Flight Simulator X\Modules\C-47_Test.lua:1: unexpected symbol near 'â' Which is what I think you get when the Lvar does not exist. Best regards, - shorthauler Control.xml
John Dowson Posted April 13 Report Posted April 13 (edited) 10 minutes ago, shorthauler said: The DC-3 is running on FSX, so it might be a bit more difficult finding the Lvar than it is in MSFS. Ah, sorry...you can still list available lvars in FSX though. 10 minutes ago, shorthauler said: There is an XML file that seems to contain Lvars, but if I send this to FSX: ipc.writeLvar(“L:Electrical master battery”, 0) I am getting an error message: Quote *** LUA Error: E:\FSX\Flight Simulator X\Modules\C-47_Test.lua:1: unexpected symbol near 'â' Which is what I think you get when the Lvar does not exist. No - there is a syntax error in your lua script. You need to use standard double-quotes, i.e. ipc.writeLvar("L:Electrical master battery", 0) Word changes these to opening and closing quotes (in the documentation) which is a bit of a pain, but you always need to use standard double quotes, not the opening/closing quotes, You won't get any error if the lvar doesn't exist - nothing will happen. In that xml file, the standard event Toggle Master Battery is used (>K:TOGGLE_MASTER_BATTERY) as well as other code, but I am not familiar with gauge programming. It does seem to also set the lvar L:Electrical master battery to 0 (for off) and 25 (for on), so you probably need to se the lvar AND send the event (using ipc.control) Edited April 13 by John Dowson Further info added
shorthauler Posted Tuesday at 12:20 PM Author Report Posted Tuesday at 12:20 PM Thank you, John, now it works. Yeds, I did copy the opening and closing quotes from the documentation. Since I am using Notepad++, I should have been aware of this.
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