Jump to content
The simFlight Network Forums

ark1320

Members
  • Posts

    624
  • Joined

  • Last visited

  • Days Won

    16

ark1320 last won the day on August 1

ark1320 had the most liked content!

1 Follower

Profile Information

  • Gender
    Male
  • Location
    Colorado, USA

Recent Profile Visitors

3,012 profile views

ark1320's Achievements

Community Regular

Community Regular (8/14)

  • Posting Machine Rare
  • Dedicated Rare
  • Reacting Well Rare
  • First Post Rare
  • Collaborator Rare

Recent Badges

32

Reputation

  1. John, thanks for the info. I had tried some presets (like View Left) but they send the same K event as in my Lua script above and didn't work. I will have to work with the Asobo default view bindings I think. Regards, Al
  2. Using FSUIPC7 in the usual way I have tried assigning both keys and buttons to different cockpit views such as View_Up, View Down, View_Left and View_Right without success. It could be I'm suffering another "senior moment" (more like a senior day in this case 🤔 ). I have also tried using calculator code and presets, all to no avail. I frequently use a little Lua script to test things, and an example is below. I know the script runs because the test message at the end of the script is displayed as expected. When this script runs, just as when I try assigning a button or key to a view, nothing happens as far as the view from the aircraft is concerned. I have tried different aircraft with the same result. Other FSUIPC7 key and button assignments are working. The Asobo control bindings for the views also work. If you have an idea on what I might be doing wrong or overlooking, or you have successfully assigned a key or button to execute a "view command" using FSUIPC7 ver 7.4.16 without the same key or button also being assigned to a default Asobo view command, please let me know. Thanks, Al Here is my Lua test script: ipc.execCalcCode(" (>K:VIEW_LEFT) ") -- view left ipc.sleep(2000) ipc.control(65680) -- view left ipc.sleep(2000) --*************** Window to Display Test Message ***************** w = wnd.open("MSFS_Test", WND_FIXED, 20,90,600,20) -- Script uses FSUIPC Window (wnd) library for message display -- These set the colors and font to be used. -- The size "-1" means the largest font to fit 1 line(s) inside the window wnd.backcol(w, 0x000) -- black wnd.textcol(w, 0x6C0) --green wnd.font(w, WND_ARIAL,-1) wnd.clear(w) -- clear window wnd.text(w, " MSFS TEST SCRIPT " ) -- Getting this message shows code above ran ipc.sleep(2000) wnd.clear(w) -- clear window
  3. It might also we worth checking that AUTO-RUDDER under Assistance Options > Piloting didn't get turned on. I have found that sometimes some of these sim assistance settings get automatically reset for some strange reason. Al
  4. Just to be clear, this Lua script will not sync the heading bug to the aircraft current magnetic heading in all cases. For example, if the NAV/HSI is in GPS mode, the value in offset 0x2FA8 seems to be the bearing to the next GPS waypoint in the flight plan, which may not be the current aircraft magnetic heading. Al
  5. Yes, you don't want to use the HSI BEARING variable to sync the heading bug. The SDK shows this:
  6. I don't have the GFC500 AP, but the below works with the Flysimware Lear35, and with the C414 which has a Garmin 605 AP. A user defined preset: SYNC_HDG_BUG_TO_CURRENT_HDG#(A:PLANE HEADING DEGREES MAGNETIC, degrees) (>K:HEADING_BUG_SET) or basically the same thing as a one line Lua script called SyncHeadingBug.lua ipc.execCalcCode(" (A:PLANE HEADING DEGREES MAGNETIC, degrees) (>K:HEADING_BUG_SET) ") Al
  7. I don't have the FENIX A320 aircraft, but I see FSUIPC7 makes LOTS of Fenix Presets available for assignment to a key or button, so suggest you look through those to see if there are some that you can make use of. And yes, Lua scripts are also a possibility if you can determine what the relevant Fenix A320 control variables (e.g., Lvars, Hvars, etc ) are for the functions you are interested in. Al
  8. Ah, a hex mask. That makes perfect sense, I should have realized that, and it explains why the offset byte value 00000001 gets toggled to 00000000, and vice versa. Thanks John. Al
  9. Did some experimenting to see if I could figure out how assigning an input event to an offset worked ... I assigned the input event ELECTRICAL_ExternalPower_1 as an unsigned byte to an available offset A080 in the general section ( I don't fly the Longitude so I don't have a specific profile for it ) of my FSUIPC7.ini file as shown below: [InputEventOffsets] 1=ELECTRICAL_ExternalPower_1=UB0xA080 Then in the FSUJIPC7 key assignments window I assigned the U key to toggle the bit(s) in that offset as shown below: Somewhat to my surprise this worked -- after restarting FSUIPC7 the U key did toggle the Longitude's external power on and off. I defined the offset as a byte because I thought the input event goes between 0 and 1. Although this worked, there are couple of things I'm not sure about: - I found the Parameter value of 1 is required, I assume because this external power function seems to need a circuit index of 1. Or is the Parameter being used in some other way? Maybe I missed it, but I didn't see anything in the manual that explained how the Parameter value is used in an Offset operation like this. - I think of the input event as toggling between 0 and 1. But if byte A080 holds a decimal value of 1, which would be 00000001 binary, then toggling those bits with the offset toggle bits operation would give a value of 11111110 binary, not 00000000 = 0. So not sure how this all works. Al
  10. If it helps the investigation here, I tried both of the above (assigned a different key to each one) and they both work to toggle the Longitude's external power on and off. Al
  11. I have no experience with the Longitude, but it seems from the log file entry for the VC button that works you need two parameters both equal to 1 to turn the ext power on. The USB key function that doesn't work seems to be using parameter values of 0 and 1 (which I think is the reason for the two entries), which turns the ext power off. The SDK shows this: So, for example I found: ipc.execCalcCode(" 1 1 (>K:2:SET_EXTERNAL_POWER) ") will turn the external power on, and ipc.execCalcCode(" 0 1 (>K:2:SET_EXTERNAL_POWER) ") will turn the external power off, where the red 1 is the circuit index value (based on the systems.cfg file entry) and the green 1 and 0 are the On & Off data values. However, I subsequently noticed there is an existing FSUIPC7 Preset called LONGITUDE TOGGLE EXTERNAL POWER SWITCH -- why not just assign a key to that (with no repeats)? Also, be aware that not all sim parking places/gates have external power available. Al
  12. Hi John, Just curious on how you make use of the open console window as suggested above. Entries in the window go by so fast I'm not able to really see what is happening. Is there something I should be doing to make better direct use of an open console window? Or is the idea just that if it looks like maybe something happened in the console window when you activated a button or clicked with the mouse, then you should go open the log file to see if you can find something related to your action? Thanks, Al
  13. Yes, of course! Thanks for catching that.
  14. John, How does the control ipc.control(0x1151) work? Does it automatically detect if auto-save is active and if so, disables it. But if auto-save is disabled, the control will activate auto-save? Or do you write a 1 or 0 with the control to toggle auto-save on and off? Is there a way within a Lua script to detect if auto-save is running (active)? Thanks, Al
×
×
  • 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.