January 24Jan 24 Hello again folks. As an intermittent user of A&O and an SD+ due to ongoing family medical issues, I sometimes struggle with, to me, complicated lines of code. I'm looking at this code... (L:H145_SDK_OH_BATTERY_MASTER, number) 0 == if{ (>H:H145_SDK_OH_BAT_MASTER_ENGAGE, number) } els{ (L:H145_SDK_OH_BATTERY_MASTER, number) 1 == if{ (>H:H145_SDK_OH_BAT_MASTER_OFF, number) } els{ (>H:H145_SDK_OH_BAT_MASTER_ON, number) } I'm wondering what I need to do to get it to work in my SD+. I've tried pasting it into a button with various actions, but I can't get it to operate the battery switch. This code is taken from a profile I downloaded for the HYPE 145 helicopter. I would appreciate any help in understanding what I need to do. I've looked at the mappings in the 145 user docs, but this code seems to do the required three actions in one snippet. Thanks...Kenny.
January 24Jan 24 Commercial Member 11 minutes ago, kenny584 said: I've tried pasting it into a button with various actions If you want to appyl it directly to an action, you would have to use type "S:" (for "Script") in the "Key Down event" section, paste the code into the box and you must supply an event value (just use 0). I would use a "Toggle" action for this, and use "L:", "H145_SDK_OH_BATTERY_MASTER, Number" ON Value = "1" as the Read variable Normally, you would create a script in AAO with this code, test it there, and then call it from the SD action using type "K:", with "scriptgroup-scripttitle" in the box (and supplying a value, that value field can never be empty, just use "0" with scripts) Edited January 24Jan 24 by Lorby_SI LORBY-SI
January 24Jan 24 Author Hello again Lorby. Many thanks for the info. This is similar to one of your other replies to me some time ago. I did not realise/had forgotten, that the "S" was for Scripts, but it's obvious now!! I'll get on it again tomorrow and report back. In AAO the Script title is "battery", and the Script group is "H145" I can now see that when I use a Script from the left side of the "Manage Script Groups" section, I'll have to enter that information into the relevant box. Many Thanks...Kenny.
Create an account or sign in to comment