October 9, 20232 yr ... and failing miserably for the default Cessna 152. I've scoured the web and found 2 different techniques. I couldn't get either to work. I know I have syntax errors, just clueless at this point. I'm using a modified LORBY_DME gauge to try to turn on the Inner Marker light. I use the DME1 and DME2 click areas as test areas, and keep the mousescroll area active to make sure MSFS isn't freezing on me. AAO says the variable name is A:INNER MARKER, it also states that the markers are available. SDK says all 3 markers are settable: (bottom of LorbyDME_MOD.xml) <Mouse> <Area> <Area> <Position X="95" Y="70"/> <Size X="25" Y="50"/> <Click>(L:INNER MARKER, bool) ! (>L:INNER MARKER, bool)</Click> </Area> <Area> <Position X="120" Y="70"/> <Size X="25" Y="50"/> <Click>1 (>L:INNER MARKER, bool)</Click> </Area> <Area> <Position X="95" Y="70"/> <Size X="50" Y="50"/> <Wheel DownEvent="DME1_TOGGLE" UpEvent="DME2_TOGGLE" Repeat="Yes" /> </Area> </Area> </Mouse> The end-goal is to have that inactive switch to the left of the 3 marker lights come back to life; google links says it's a Marker Test (I just want to turn all 3 lights ON, no audio beeping test). I won't be using that actual switch, all my controls will be done by external hardware switches, interfaced with a PIC microcontroller via USB and and managed by VS2022 C++. Robert(retired mainframe programmer, dabbles in PIC BASIC, VS2022 C++ and now XML apparently)Updated Steam MSFS, and most recent AAO download. Edited October 9, 20232 yr by DemonDNF
October 9, 20232 yr Commercial Member I'm not sure that I understand - as you say, the SDK variable is A:something. Yet, in your gauge, you are using L:something? Why the L:? The general rule is (or rather was) though, that you don't set AVars directly, you use a K: event to change their value. But in MSFS this rule is no more. Isn't there an input event assigned to that button, did you check with the MSFS developer mode what happens when you mouse-click on that button? Edit: also, there is a syntax error Quote <Click>1 (>L:INNER MARKER, bool)</Click> must be <Click>1 (>L:INNER MARKER, bool)</Click> You cannot use special characters like < > & inside the tags of an XML file, they must be replaced with their encoded counterparts Edited October 9, 20232 yr by Lorby_SI LORBY-SI
October 9, 20232 yr Author Sorry, cause I was desperate and trying anything at this point. I had taken that screen earlier today during one of those tests. This is current code that doesn't turn on the marker: <Mouse> <Area> <Area> <Position X="95" Y="70"/> <Size X="25" Y="50"/> <Click>(A:INNER MARKER, bool) ! (>A:INNER MARKER, bool)</Click> </Area> <Area> <Position X="120" Y="70"/> <Size X="25" Y="50"/> <Click>1 (>A:INNER MARKER, bool)</Click> </Area> <Area> <Position X="95" Y="70"/> <Size X="50" Y="50"/> <Wheel DownEvent="DME1_TOGGLE" UpEvent="DME2_TOGGLE" Repeat="Yes" /> </Area> </Area> </Mouse> Robert
October 9, 20232 yr Commercial Member In my C152 the button you've encircled in red is completely dead. It is not clickable with the mouse. How can I test what you are trying to do? The default events would be 1 (>K:MARKER_SOUND_TOGGLE) 0 (>K:MARKER_SOUND_SET) 1 (>K:MARKER_SOUND_SET) I imagine that the A: vars tell you when you receive a marker sound - it doesn't really make sense to me that they should be settable in the first place. It doesn't make sense that you would listen to a specific marker - or does it? Furthermore, I would expect the avionics code to override whatever you set immediately, as it is listening for the actual markers? Edited October 9, 20232 yr by Lorby_SI LORBY-SI
October 9, 20232 yr Author 12 minutes ago, Lorby_SI said: ... Isn't there an input event assigned to that button, did you check with the MSFS developer mode what happens when you mouse-click on that button? I couldn't find an event in the SDK associated with setting the markers ON/OFF. I've never used "MSFS developer mode", no clue what that is. I've been updating this modified gauge for my testing cause it's about all I know when it comes to gauges (just started). Everything I read in forums says I should be able to change a variable using CLICK in gauge XML, but the vast majority use an EVENT as an example.(...reading your reply now...) Robert
October 9, 20232 yr Commercial Member Just now, DemonDNF said: I couldn't find an event in the SDK associated with setting the markers ON/OFF. I've never used "MSFS developer mode", no clue what that is. I've been updating this modified gauge for my testing cause it's about all I know when it comes to gauges (just started). Everything I read in forums says I should be able to change a variable using CLICK in gauge XML, but the vast majority use an EVENT as an example.(...reading your reply now...) Robert OK, but I still haven't got any clue what you are trying to do. Do you want to turn the blue/yellow/green LIGHTS on? What is your goal? And why are you using a gauge to test this??? LORBY-SI
October 9, 20232 yr Author 3 minutes ago, Lorby_SI said: In my C152 the button you've encircled in red is completely dead. It is not clickable with the mouse. How can I test what you are trying to do? The default events would be 1 (>K:MARKER_SOUND_TOGGLE) 0 (>K:MARKER_SOUND_SET) 1 (>K:MARKER_SOUND_SET) I imagine that the A: vars tell you when you receive a marker sound - it doesn't really make sense to me that they should be settable in the first place. It doesn't make sense that you would listen to a specific marker - or does it? Furthermore, I would expect the avionics code to override whatever you set immediately, as it is listening for the actual markers? I know, that's why I said I will control this from an external physical toggle switch (I interface with MSFS via USB). I use that modified DME gauge as a test bed. I use the click areas for NAV1 and NAV2 to set INNER MARKER on. Those events only concern the sound (it's the MKR button above the radio stack), I just want to turn on the lights. In a real Cessna 152, that dead toggle switch in MSFS is used to test the markers. I believe they light, but the beeping sound also comes on. But I'm afraid you might be right that MSFS immediately overrides my input and says they are OFF.
October 9, 20232 yr Commercial Member 1 minute ago, DemonDNF said: I use that modified DME gauge as a test bed. I use the click areas for NAV1 and NAV2 to set INNER MARKER on. OK, but WHY? Why are going through such a complicated procedure? If you want to just write and test RPN code, use the RPN Editor and the "Test" button. LORBY-SI
October 9, 20232 yr Author Cause I had tried and failed miserably to get that to work in the beginning. 😄 (haven't tried with these though) This is what I'm trying to accomplish. Robert
October 9, 20232 yr Author Both CLICKs give me a red light in the RPN editor when I include CLICK endmarks. 1st one gives red light without CLICK endmarks. But this one gives green light: 1·(>A:INNER·MARKER,·bool) I click on TEST and nothing happens. Edited October 9, 20232 yr by DemonDNF
October 9, 20232 yr Commercial Member 8 minutes ago, DemonDNF said: Cause I had tried and failed miserably to get that to work in the beginning. ?? 1. connect AAO to the simulator. 2. You open "Scripting->RPN Scripts Editor". 3. Enter your code in the box. The green/red light on the top right will tell you if you have syntax errors. 4. Press "Test". 5. Observe what happens in the sim. Repeat. I've checked the behavior code, and I think that what you are trying to do is impossible. The Emissive Code (=which makes something light up) is tied directly to (A:MARKER·BEACON·TEST·MUTE,·Bool)·and (A:OUTER·MARKER,·Bool). These AVars apparently cannot be set to a different value. It looks like Asobo were on their way to actually implement the test button, but got sidetracked at some point. Edited October 9, 20232 yr by Lorby_SI LORBY-SI
October 9, 20232 yr Commercial Member 3 minutes ago, DemonDNF said: I click on TEST and nothing happens. That is because nothing happens. See above. Edited October 9, 20232 yr by Lorby_SI LORBY-SI
October 9, 20232 yr Commercial Member 3 minutes ago, DemonDNF said: Both CLICKs give me a red light in the RPN editor when I include CLICK endmarks. The XML tags of the gauges have nothing whatsoever to do with RPN Code. LORBY-SI
October 9, 20232 yr Author 2 minutes ago, Lorby_SI said: ?? 1. connect AAO to the simulator. 2. You open "Scripting->RPN Scripts Editor". 3. Enter your code in the box. The green/red light on the top right will tell you if you have syntax errors. 4. Press "Test". 5. Observe what happens in the sim. Repeat. I've checked the behavior code, and I think that what you are trying to do is impossible. The Emissive Code (=which makes somthing light up) is tied directly to (A:MARKER·BEACON·TEST·MUTE,·Bool)·and (A:OUTER·MARKER,·Bool). These AVars apparently cannot be set to a different value. It looks like Asobo were on their way to actually implement the test button, but got sidetracked at some point. That's what I had done, even saved my script to retry later once I learned what was wrong.So that means the SDK is wrong when they say the 3 markers are settable...😞
October 9, 20232 yr Author 3 minutes ago, Lorby_SI said: The XML tags of the gauges have nothing whatsoever to do with RPN Code. Yeah, I'm still learning what's what. 😉
Archived
This topic is now archived and is closed to further replies.