Jump to content
The simFlight Network Forums

wade1

Members
  • Posts

    11
  • Joined

  • Last visited

  • Days Won

    1

wade1 last won the day on May 15

wade1 had the most liked content!

About wade1

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://

Profile Information

  • Gender
    Male
  • Location
    new zealand

wade1's Achievements

Rookie

Rookie (2/14)

  • Collaborator Rare
  • First Post Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later Rare

Recent Badges

1

Reputation

  1. Well, to a certain extent John my son and nephew are both professional AI programmers, and they both said it was tremendous for the tedious coding donkeywork, but they also told me that expert human input is still needed for the truly complex stuff. However, it would save you a lot of your precious time dealing with basic, repetitive queries
  2. thanx for the tip john Unfortunately, these b200 lvars always seem to start at -1 .. but I admit i was shocked at chat gpt's knowledge of fsuipc, which it must have stolen off you via the forums and every other small snippet of information about fsuipc on the web but integrating those snippets by parallel processing it via a neural network thats the mind bend !!! ..chatgpt 4.0 has 175 billion parameters and is seriously good, but the new chat gpt 5 which is being trained as we speak and hopefully released in aug - sep will have 5 trillion parameters111 and will also have vastly improved neural networks .!!!! i predict it will write lua scripts for even the most complicated panels in msfs 2020
  3. Now i asked Chat GPT to solve another issue i have, a lua script that cycles the switch, ... great !!!! but on keyboard 1 also what i want to do is run all my lvar switches on the B200 on a second keyboard so i can free up keyboard 1 for other stuff. The only program i could find that recognises extra keyboards is HIDmacros, which is an excellent program and conveniently has an interface for Sim Connect, which means i can get quite a few fsx commands onto keyboard 2 but it doesn't interface directly with fsuipc ? However, the author has created some code/functions using offsets to enable Hid macros to send my lua scripts to Fsuipc and use them on keyboard 2!!!. But it all looked complicated to me John talked about another method using IPCready.lua which was a bit beyond me also , quite frankly Chat GPT to the rescue; here is the answer it gave me which worked perfectly !!! Launch HIDMacros and ensure your second keyboard is recognized and listed under Devices. Navigate to the Macros tab, select New, and create a macro for each key you want to program. Name the macro appropriately. Use the Scan button to record the key press from the second keyboard. is command instructs FSUIPC to execute the CycleSwitch Lua script when the associated key on the keyboard is pressed. Ensure the script name matches exactly what is configured in FSUIPC. HIDMacros.SetFSUIPCString &H0D70, 40, "Lua CycleSwitch" Step 3: Save and Compile Click Compile to compile the script within HIDMacros. Save your configuration to ensure all changes are retained.
  4. Interestingly Chat GPT gave a completely different method for Prepar 3D but this probably due to the fact its an LLM and will produce a different response on repeated queries -- Variable to track the state of the switch local switch_state = 0 -- Assuming it starts at OFF function cycle_antiice_switch() -- Increment the state switch_state = switch_state + 1 -- If the state exceeds 2, reset to 0 if switch_state > 2 then switch_state = 0 end -- Map the incrementing state to LVar values local lvar_value = 0 if switch_state == 0 then lvar_value = 0 -- OFF elseif switch_state == 1 then lvar_value = 1 -- ON elseif switch_state == 2 then lvar_value = -1 -- TEST end -- Set the LVar ipc.writeLvar("ASD_WNDSHLD_ANTIICE_PILOT", lvar_value) end -- Assign the function to a key or joystick button in FSUIPC event.key("Q", "down", "cycle_antiice_switch")
  5. I see John is on leave so i went to the newest version of Chat GPT 4o.. i have a subscription, and posed the question. i was surprised that it answered such a specific question with ease .. a bit scary actually the power of AI . However, i have not tested it yet on my PC simulator. .I would be interested in Johns critique of the GPT CHAT 4o answer and code but big UPS to John for connecting FSUIPC to LUA wot a godsend that is " To create a LUA script for FSUIPC that cycles through the positions of the three-way switch (OFF, ON, and TEST) using one key, you can use the following script as a starting point. This script will increment the switch position each time the key is pressed and wrap around when it reaches the end. Here is the script: Create a new LUA script file and name it something like cycle_switch.lua. Add the following code to the file: Save the script in the Modules folder of your FSX installation. Open FSUIPC and assign a key press to run this LUA script. To do this: Go to the "Key Presses" tab in FSUIPC. Press "Set" to define the key you want to use for cycling the switch. In the action list, select "Lua <your_script_name>". In this case, it will be "Lua cycle_switch". With this script, pressing the defined key will cycle the windshield anti-ice switch through its positions: OFF (0), ON (1), and TEST (-1). This way, you only need to use one key to control the switch. -- Define the LVar for the windshield anti-ice switch local lvar_name = "ASD_SWITCH_WDSHLD_ANTIICE_PILOT" -- Define the switch positions local switch_positions = {-1, 0, 1} -- Function to cycle through switch positions function cycleSwitch() -- Get the current value of the LVar local current_position = ipc.readLvar(lvar_name) -- Find the index of the current position local current_index = nil for i, v in ipairs(switch_positions) do if v == current_position then current_index = i break end end -- Determine the next position local next_index = current_index + 1 if next_index > #switch_positions then next_index = 1 end local next_position = switch_positions[next_index] -- Set the LVar to the next position ipc.writeLvar(lvar_name, next_position) end -- Call the function to cycle the switch position cycleSwitch()
  6. Hi John I am a newbie with FSUIPC LVArs, i have been playing around with my brother's Carenado King Air B200, and the LINDA console has found a number of Lvars that are not listed as FSX controls that i can use...... With most of them, i have been assigning them in a B200.MCRO file ( placed in the modules folder), mostly with the toggle parameter but also with the SET parameter, and then assigning a key press in FSUIPC, and they work like magic. They are all working fine However, about 4 or 5 switches in the virtual cockpit are three way switches !!!. For example, there is a 3 position windshield anti-ice switch in the virtual cockpit, which is defined in the console ( as ASD_SWITCH_WNDSHLD_ANTIICE_PILOT.. I found the switch has three positions: OFF, ON and TEST Its values are 0 1, and -1 . I have assigned 3 different keys on my keyboard (QWE) using FSUIPC with the LVar above and different parameters( -1,0,1) and can press each key to each switch position correctly, even though it is hugely wasteful using three keys ( i just wanted to check if it works ). What i need is a FSUIPC command? that will cycle between the three positions on the one key!!! Do i need a LUA script --can you give me an example ? or can i do it easily in FSUIPC.. im stumped !!!! any help would be greatly appreciated
  7. good point peter i must have had a brain fade i did this process in the past when i was playing with the throttles but completely forgot about it this time thanx for your help i will give a try and see if it cures my joystick problem .cheers mate most appreciated
  8. Hi Pete yes perhaps i didnt explain correctly , when you say assign the axes in fsuipc i assumed that this is the procedure/.. this is what did i pushed rescan moved the aileron axis and up popped the x axis , and i moved it full range and got a digital readout from fsuipc i then selected "send to fsuipc calibration" then i pushed rescan again and moved the elevator and up popped the y axis in the little box and moved it up and down and got a digital range readout from fsuipc i then selected once again "send to fsuipc calibration" Then i went to fsuipc joystick calibration and calibrated both axes in fsuipc . I assumed that is how the axes get assigned in fsuipc is there some other step that i am not aware of??? that has to be done ???? even after doing this procedure when I disabled the joystick in the FSX settings i get NO movement in FSX from fsuipc calibrated joystick ECEN THOUGH when i go back to fsuipc it is still registering the joystick in the fsuipc joystick calibration . Is there some extra step in fsuipc of assignimg the axes that has to be done.. It is very frustrating as i am following the fsuipc guide as closely as possible and i cannot understand why FSx is mot picking up the my FSIPC calibrated joystick
  9. HI I am building a research based simulator using FSx ( acceleration ) . The problem i am having is that i am having a bit of joystick lag with FSX controlling my joystick, I have a registered up to date version of FSUIPC installed , I have used the rescan method to find the joystick axes and calibrated them using fsuipc calibration successfully . The problem is as soon as i disable the joystick or delete the joystick axes in FSX settings. FSX doesnt doesnt pick up the joystick even though FSUIPC still registers the axes so i end up with no joystick control With the joystick re-enabled in fsx settings and registered on fsupic axes i can tell that FSUIPC and fSX are fighting for control for teh joystick and there is unusual movement and lag when flying the aircraft. it is driving me crazy cos FSUIPC looks like a far better way to calibrate and provides more sensitivity to the joystick controls. Is there some setting i can change in the fsx.cfg or fsuipc.ini ??/ that would help My joystick is a simple potentiometer based copntrol column going through a haagstrom encoder board which provides three basic axes x, y, z(rudder) . and registers as a simple joystock in control panel and FSX. Really need a definitive answer in this one so your help would be greatly appreciated .. BTW i have tried a standard microsft joystick and the same effect occurs so its not the joystick
  10. I have puzzling problem setup 1 -one PC - fs2004 , gpsout-output com2 , mix-w virtual com port 2 and 3 set up , polyview moving map display ( set to receive NMEA on com 3 ) Works brilliantly!!! Setup 2 two pCs - master PC , fs2004, gspout-output com1, client pc , polyview moving map display ( ( set to receive NMEA on com 1 ) a borrowed null modem cable attached between master and client to transfer data works brilliantly !!! Setup 3 two pCs - master PC , fs2004, Widefs(latest version ) , gspout.ini set to port=widefs client pC , wideclient.ini set to port com2, speed 4800 ,mix-w virtual com port 2 and 3 set up , , polyview moving map display ( set to receive NMEA on com 3 ) NO GO ! no Nmea data detected ??? notyhin g wrong with WideFs and wideclient as they do work with other software eg FS commander , AV weather etc so can only think it must be some obscure wideserver.ini or wideclient.ini settings Tried different comports , diff speeds still no luck ??? then got desperate and swapped PC master into clent and client into master pc and reinstalled correct software for each machine .. still no luck !!!! Any ideas is it soem obscuire
×
×
  • 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.