Jump to content
The simFlight Network Forums

joshuamarius

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Florida, US

joshuamarius's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I've programmed in quite a bit of languages so for me this was not so new, but tying it all up was definitely overwhelming. I can't imagine how difficult it would be for somebody that has never programmed. The manuals definitely helped in finding the events, understanding offsets, etc., but often left me asking more questions such as "where". Some manuals are in desperate need of an Index as I would scroll up and down going crazy trying to find information after failed searches. I also noticed that a lot of the FAQs I had were the subject of many repeated topics in the forum that I really could not find in any of the manuals. When I found the existence of event.control, I still had tons of questions and as I pointed out, could not find an example in any of the included scripts. I had to comb the forum and read through about 8 - 10 topics to finally come across somebody attempting the same. But I understand, it is a learning curve. I'm willing to send you an email with my experience. I can now help in the forums and willing to volunteer my time in any way I can help. Also, do you have any language files for FSUIPC? I am willing to volunteer my time to get the main application, manuals, and comments in scripts/examples translated to Spanish and even open a Spanish section in the forum. I think that would be tremendous for the community...and well...your sales 😉
  2. I got it working! 😁 Managed to get the controls monitored and offsets adjusted accordingly. Unfortunately it took me a bit because I had to google around for a while because I could not find examples of what I was trying to do. There are no examples of the event.control in action in the Example LUA Plugins folder either 😞 I stumbled across another post on here and followed the syntax. I can't believe I got this to work! Once I'm done ill publish my findings and hopefully help out others. Thanks for your help!
  3. Sorry Pete! I meant ipc.control(65823, 1) - Sorry about that! That's what I need to monitor; basically this aircraft uses that control to automatically disable certain autopilot functions. I would like to set a custom offset based on the ipc.control executed with its parameter. So... ipc.control(65823, 57) Disables Autopilot - Capture that, write to custom offset 0x66C5 (Turn LED OFF) ipc.control(65823, 60) Disables Vertical Speed, etc...capture that, write to another offset 0x66C4 (Turn LED Off) I can see these events taking place in the FSUIPC log, and since it's the same control (65823) all I can do is monitor the parameter to act accordingly. Now, I know if you look these controls up they do not match the description of the action as 65823 is THROTTLE4 SET, but the parameter is captured by some code in the gauge and acts accordingly (it is not sent to the FS or LVARs). I would like to capture that and write to the offset to trigger the LEDs. This is the last component, I am 98% done with the Autopilot Panel, SO CLOSE! Thanks again.
  4. Yes, the LUA scripts have been working properly and I have been using event.control successfully, but I just realized I worded that in a confusing way. What I am trying to do is monitor if these controls have been executed, not execute them. The test LUA scripts I wrote that get called up by button presses successfully execute the event.control, but, the Aircraft itself also executes these controls automatically without my input. Let me describe a sequence as an example: Press Button 1 > Execute event.control(65823, 1) > Write to custom offset which turns on LED (As example, this tells the aircraft to climb to 5000 ft) The aircraft Climbs to 5000ft and while leveling , it then automatically executes event.control(65823, 1) How do I monitor, or capture that this event.control(65823, 1) has taken place and write to my custom offset to turn the LED off? Another example I can think of is let's say I wanted to count the amount of times event.control(65823, 1) has been executed since the flight began. (Start monitoring) event.control(65823, 1) is executed Counter = 1 event.control(65823, 1) is executed Counter = 2 event.control(65823, 1) is executed Counter = 3 ...etc... (end monitoring) Hopefully that makes better sense. Thanks again for your time.
  5. Thanks again for the help! Made a lot of progress after extracting all of the LVARS using the script you recommended. Then wrote a few LUA scripts and the interfacing is behaving as expected, but now I have to dig into the complex if/then/else loops, etc. I searched the forums and read the LUA library and it wasn't specified very well how to monitor if a control has been executed. Maybe I missed something. To be more specific, as the aircraft levels off, two controls are executed to disable the Vertical Speed select automatically. When this happens, I would love to turn the LED OFF, so in Psuedo-code: If ipc.control(65823, 1) and ipc.control(65823, 2) are executed, then write to custom offset to turn off LED. Unfortunately It has to be those specific controls with those specific parameters. Can this be done? Any ideas are welcome.
  6. As an example I created a new Mouse Macro, pressed a button on the Autopilot, and the result was: RX9f260*X55cc,22 Log: User Macro: 0TEST=RX9f260*X55cc,22 I know this is manually triggered by a keypress, but, is there anyway to refer to the string/code above and trigger it automatically? So as a crazy example, I press Button 5 on joystick, the above happens as expected. Or, as an automatic action, something happens on the Sim (level off, etc), an offset is modified, most liely custom, which in turn refers to and enables the macro automatically. I'm just looking at my options to fool the sim into getting the results I need. Now, interestingly enough, I took your advice and referred to the LUA Library Document. I saw a zip file named Example LUA plugins, to my amazement, there is a LUA plugin in there: F1MustangSwCtl.zip - The plugins describe exactly what I was looking for but for a different Autopilot hardware unit. The script solves the problem with the exact method I was thinking of implementing, but just needed to learn how to do it in LUA, and there it is laid out! All this time...WOW! I will start working on it and let you know if I need further assistance. Thanks again for your time and answering my questions.
  7. Pete, can't thank you enough for all your help. With a mixture of FSUIPC and an input.ini file made specifically for this Aircraft I have almost completed the interfacing with several components. I do have a few questions and please excuse me if they are very basic but I have not found direct answers to these questions in the forum or documentation. I am still learning FSUIPC. 1) The Mouse Macros have come in VERY handy because since the output of some actions in this Aircraft are not standard, they can be triggered with the Macros. So the question is, I see each macro is assigned a string, is there a way to monitor these strings and modify a custom offset when they are triggered? 2) Regarding the Engine 4 N1% parameters we mentioned above, is there a way to monitor these parameters and modify another offset? I have seen sample LUA scripts of writing to an offset, but what about reading and modifying specifically the parameters? The parameters are unique values so if there is a way to do this, I have solved my problem. 3) Combing the forums I read some FS Controls may not have an offset assigned. Is there a way to tell this by looking at the log/console Window? So for example: 198438 *** EVENT: Cntrl= 65580 (0x0001002c), Param= 0 (0x00000000) AP_MASTER I can see in the above line the control 65580 is Autopilot Master, but how would I know the actual offset by looking at the log, or do I have to look it up in the list (07BC) ? Thanks again for your time on this.
  8. Pete, thanks so much for the quick response and sorry I left so many things unanswered. I think you may have answered my question. The FSUIPC output lines I put in my post are from clicking on buttons in the 3D Cockpit and obviously these are out of whack because a few of them trigger the same action. To answer your question, I am wanting an input (press of a button or switch) to cause a specific output, in this case turn on an LED. Currently, the offsets are being used the following way by Mobiflight (very useful program for interfacing with Arduino cards). Let's say I have an example button 1: Input: Press button 1 > trigger 0x07BC offset > Enables AP Master in Sim/Aircraft Output: Monitor offsets, when 0x07BC is triggered, enable LED1 (AP Master LED) You can also do: Input: Press button 1 > trigger Event ID 65580 (AP Master) Output: Monitor offsets, when 0x07BC is triggered with the above, enable LED1 (AP Master LED) So far so good! You can also do SimConnect variables. This works beautifully. However, because of what you have mentioned above, the aircraft definitely has a fault because when you press certain buttons in the 3D Cockpit, a generic action seems to be outputted, which has nothing to do with the label of said button. So clicking on V/S or FLC buttons trigger THROTTLE4_SET :( instead of outputting the V/S Offset, etc. Is there anyway to use any of the parameters outputted in the logs to produce the desired output? Or maybe anyway to modify the Aircraft cfgs and force those buttons to produce the desired offsets? Maybe obtain the parameter as shown in the log, and if that happens trigger a specific offset? Example: the V/S button generates Param= 63 (0x0000003f) as seen in the log, this is read as a variable, checked, and depending on the parameter, the right offset is sent out: 0x07EC (Vertical speed hold). Just throwing out some ideas. Any help is greatly appreciated. Please let me know if you need more clarification on my side. Thanks.
  9. FSUIPC 4.974 - Registered User FSX: SE Add-On Aircraft: Flight 1 Citation Mustang V2 I did quite a bit of searching and testing before I decided to post here and hope I can get some help. Thanks Pete for such a great product! I have never had problems with FSUIPC in either FSX:SE or Prepar3d v4. I've made Mouse Macros work wonderfully with encoders, Keyboard shortcuts, etc and everything has worked as expected. I am now getting into more advanced stuff. I have a custom made AutoPilot hardware Panel which allows the basics (Approach, AP Master ON, HDG Hold, etc). I am interfacing with MobiFlight and custom made variations of the same, most of the offsets are easily obtained and LEDs light on correctly depending on what is being enabled. So far so good. However, on this aircraft, when I look at FSUIPCs output log, If I enable the Flight Director or the Alt Hold, I see the appropriate entries and they work beautifully: 7784125 *** EVENT: Cntrl= 65808 (0x00010110), Param= 0 (0x00000000) AP_ALT_HOLD_ON 7505515 *** EVENT: Cntrl= 66288 (0x000102f0), Param= 0 (0x00000000) TOGGLE_FLIGHT_DIRECTOR However, when I click some of the other buttons within the 3D Cockpit, they generate the same exact output with a different parameter. For example, pressing APR, BC, SPD or FLC produce the following: 6676625 *** AXIS: Cntrl= 65823 (0x0001011f), Param= 51 (0x00000033) THROTTLE4_SET 7602218 *** AXIS: Cntrl= 65823 (0x0001011f), Param= 55 (0x00000037) THROTTLE4_SET 7615812 *** AXIS: Cntrl= 65823 (0x0001011f), Param= 10 (0x0000000a) THROTTLE4_SET 7801687 *** AXIS: Cntrl= 65823 (0x0001011f), Param= 63 (0x0000003f) THROTTLE4_SET This of course is a problem. If I want to enable the LED light as soon as I hit approach, there is no way for me to program this as I need the exact Offset to be outputted, for example: 0800 I did play around copying and pasting some of the outputs above and did get one of the LED lights to come on but it cannot be controlled since the output is the same. Is there anything that can be done to either manipulate or use the output the same way as the pre-set ones in the simulator and fsuipc? It's very easy for me to create a mouse macro, keyboard shortcut, use an Event ID, or modify the input.ini for the aircraft and push the buttons, so this is not a problem; the problem is I need an offset to trigger the Output LED in Mobiflight. Can this be done? Should I go another route, LUA, etc.? I hope this makes sense and thanks for any help you can provide.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.