danewatson Posted March 20, 2020 Report Share Posted March 20, 2020 Just curious if there is a key command that would allow me to enter a 3-digit number to set an ADF Compass Card. At the moment you can obviously turn the knob manually, but I would like to be able to adjust the compass card by a keyboard shortcut like you can with OBS, etc. I did setup a key in FSUIPC Key Presses for Adf Card Set but obviously I am missing something because it does not work. Regards, Dane Watson Link to comment Share on other sites More sharing options...
aua668 Posted March 20, 2020 Report Share Posted March 20, 2020 Hi, You did not mention, which simulator you are using. In P3D V4 you have thre controls for ADF Card: 65882 ADF_CARD_DEC 65881 ADF_CARD_INC 66039 ADF_CARD_SET Which parameter did you use for ADF_CARD_SET? Please show a screenshot, how you did configure your key. RGDS Reinhard Link to comment Share on other sites More sharing options...
danewatson Posted March 20, 2020 Author Report Share Posted March 20, 2020 11 hours ago, aua668 said: Hi, You did not mention, which simulator you are using. In P3D V4 you have thre controls for ADF Card: 65882 ADF_CARD_DEC 65881 ADF_CARD_INC 66039 ADF_CARD_SET Which parameter did you use for ADF_CARD_SET? Please show a screenshot, how you did configure your key. RGDS Reinhard First thank you so much for your prompt reply. Sorry - I should have indicated the sim - P3Dv4.5 I did not have the Parameter number set but I have now changed my settings for my ADF_CARD_SET as 66039. I am attaching two print screens one for ADF and the other for OBS, I am also attaching for your review my .ini file and my .log file. This is very strange as it still does not work. But what I do see happening is that when I press my control key to set my OBS heading and then when I press my control key for my ADF_Card_Set - the ADF does not move BUT the OBS does - this is very weird to me. Hope you can help. FSUIPC5.ini FSUIPC5.log Link to comment Share on other sites More sharing options...
Thomas Richter Posted March 21, 2020 Report Share Posted March 21, 2020 Hi, the parameter you use for Adf Card Set is its Control value send to FS, its is FS control code. The Parameter, you will find well described in the manuals, is the value you want to set it too. As you set the Parameter to 66039 it means you want to set it 66,039 deg heading. The Parameter for Adf Card Set needs to be the heading you are looking for, 0 to 359. Thomas Link to comment Share on other sites More sharing options...
aua668 Posted March 21, 2020 Report Share Posted March 21, 2020 Hi, Thomas answered already perfectly - the screenshot showed the misunderstanding clear. For the OBS: In that case you are triggering a LUA routine "NpCsetOBS.lua". That's a complete different way to trigger an action. You could also experiment with the Inc and Dec commands to check, if the ADF is reacting. If this is an commercial add-on plane, it's not always guaranteed, that they use the standard simulator functionality in their gauges. Rgds Reinhard Link to comment Share on other sites More sharing options...
Pete Dowson Posted March 21, 2020 Report Share Posted March 21, 2020 Just for added clarification, the control ADF_CARD_SET is really an Axis control, best assigned to a rotary axis, not a button or switch, unless you are always setting a fixed value (which would be the parameter). For switches and buttons you have more flexibility using the INC and DEC controls, possibly with Repeat enabled for faster changes. Pete Link to comment Share on other sites More sharing options...
danewatson Posted March 21, 2020 Author Report Share Posted March 21, 2020 THANK YOU - Thomas, Reinhard and Pete I see what you are all saying and I believe I understand. What I have done is what Reinhard suggested and I assigned a Key Press for: 65882 ADF_CARD_DEC and 65881 ADF_CARD_INC and it works very well. My wish was that there was a Lua NpCsetADF_Card setting that you could press the key and input the heading you want the card set to - but that's OK - all is good. Link to comment Share on other sites More sharing options...
aua668 Posted March 22, 2020 Report Share Posted March 22, 2020 Hi, If you could share the file "NpCsetOBS.lua" here, there is a good chance to modify it in a way that you can use it. Rgds Reinhard Link to comment Share on other sites More sharing options...
danewatson Posted March 22, 2020 Author Report Share Posted March 22, 2020 4 hours ago, aua668 said: Hi, If you could share the file "NpCsetOBS.lua" here, there is a good chance to modify it in a way that you can use it. Rgds Reinhard Thanks Reinhard, Attached is the NpCsetOBS.lua original script. I tried to create a script called NpCsetADF_Card.lua (also attached) but I have never done a script before and did not know what I was doing so it does not work. Regards. Dane NpCsetOBS.lua NpCsetADF_Card.lua Link to comment Share on other sites More sharing options...
spokes2112 Posted March 23, 2020 Report Share Posted March 23, 2020 Dane, You could run with this single line lua.. Tested ok. Copy the code below and save it as ADF_CARD_SYNC.lua Assign a key or button to "Lua ADF_CARD_SYNC" Done. Roman ipc.control(66039, ipc.readDBL(0x2B00)) Link to comment Share on other sites More sharing options...
danewatson Posted March 23, 2020 Author Report Share Posted March 23, 2020 55 minutes ago, spokes2112 said: Dane, You could run with this single line lua.. Tested ok. Copy the code below and save it as ADF_CARD_SYNC.lua Assign a key or button to "Lua ADF_CARD_SYNC" Done. Roman ipc.control(66039, ipc.readDBL(0x2B00)) Greetings Roman, I did exactly what you laid out - but for me it does not work. When I press the assigned key all that happens is the card turns to 66 degrees and that's it. You are not able to enter in a three digit number for where you want the card to be. Regards. Dane Link to comment Share on other sites More sharing options...
spokes2112 Posted March 23, 2020 Report Share Posted March 23, 2020 Ok, maybe I misunderstood your intentions then.. My fault. Missed the very first part where you wanted to "manually" enter the card direction. ( bangs head! 😒 ) This one just sets it to your current mag heading.. Egg on face. Roman PS - nice to see old adf navigation alive and well :) Link to comment Share on other sites More sharing options...
aua668 Posted March 23, 2020 Report Share Posted March 23, 2020 Hi, Thanks for sharing the LUA. Now I know, where you are coming from. You are using the relatively old FSX NumPad Control Utility from Al Klayton, which can be found here: https://simviation.com/1/browse-Utilities-65-5?mark=49328#49328 This is a set of LUA files, which provide the possibility to enter values for the radios via the NumPad. But checking the ZIP file I found, that there is also an ADF routine included to set the ADF. Why aren't you using this routine? Has your aircraft two ADFs (ADF1 and ADF2)? Be aware, that these modules typically will work with standard airplanes. If you use a specific add-on aircraft with an own implementation of the radios, these scripts will not work. And in the standard ADF implementation of FSX there was only one ADF implemented. ADF1 and ADF2 has been added later, as far as I remenber. If you want to adopt these routines, you should check the routine"NpCkeyData.lua". There the actual numbers are transferred to the respective radios via ipc.control calls. So I assume, you have to learn LUA programming to extend the functionality of these modules 😉 Or you contact Al Klayton, if he is still around in the flight simulator scene. Another option is to buy some hardware add-on (Saitek radio panel or similar). You will see, that this makes more fun and realism than typing the numbers via the keypad. Rgds Reinhard Link to comment Share on other sites More sharing options...
danewatson Posted March 23, 2020 Author Report Share Posted March 23, 2020 9 hours ago, aua668 said: Hi, Thanks for sharing the LUA. Now I know, where you are coming from. You are using the relatively old FSX NumPad Control Utility from Al Klayton, which can be found here: https://simviation.com/1/browse-Utilities-65-5?mark=49328#49328 This is a set of LUA files, which provide the possibility to enter values for the radios via the NumPad. But checking the ZIP file I found, that there is also an ADF routine included to set the ADF. Why aren't you using this routine? Has your aircraft two ADFs (ADF1 and ADF2)? Be aware, that these modules typically will work with standard airplanes. If you use a specific add-on aircraft with an own implementation of the radios, these scripts will not work. And in the standard ADF implementation of FSX there was only one ADF implemented. ADF1 and ADF2 has been added later, as far as I remenber. If you want to adopt these routines, you should check the routine"NpCkeyData.lua". There the actual numbers are transferred to the respective radios via ipc.control calls. So I assume, you have to learn LUA programming to extend the functionality of these modules 😉 Or you contact Al Klayton, if he is still around in the flight simulator scene. Another option is to buy some hardware add-on (Saitek radio panel or similar). You will see, that this makes more fun and realism than typing the numbers via the keypad. Rgds Reinhard Thank you Reinhard for your efforts and suggestions/comments - much appreciated Regards, Dane Link to comment Share on other sites More sharing options...
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