Jump to content
The simFlight Network Forums

flygutt

new Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Norway

flygutt's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Got it working :) The missing 'end' was put in its place but the script still did not work so I did some adjustments to it. Seemed some of the variables did not update inside WHILE loops so I redifined the variable inside the loop and then they worked. I.e. line 16 and 17 went into an infinite loop after aircraft had landed. Line 1 had to be repeated inside this WHILE for it to be FALSE and the script could move along. PMDG737NGX requires me to calibrate throttles through FS own controller assignments for autothrottle to work properly together with TQ motoring. On joystick calibration in Windows I did not put the throttle handle all the way back resulting in 16383 readout in FSUIPC every time its moved back. With 16383 the NGX still dont idle. If you hit F1 they will jump a little step back and the engine N1 value also decrease about one percent.
  2. Ive made a Lua script for putting throttle handles to idle position in different phases of flight. Its supposed to work with PMDG737NGX and my throttle quadrant. I have problems with the throttle handles inside FSX not being put fully back at idle when my TQ handles are put all the way back even after calibrating of the TQ. On landing I cant activate the reversers because of the engines not running at idle. So Ive made a script that should send a button press command for idling them when hardware TQ handle are moved inside a specified range. When coming outside of the range FSUIPC is set to kill the script. Im relatively novice in Lua maybe there are better ways to organize the script. Im not sure if I can do a new IF check inside another IF. WHILE loop inside IF? The script checks if aircraft is on the ground and if the reverser is not active then idle the throttle. Reverser check is revInd variable. If the aircraft is in the air do nothing if Radio Altitude is more than 100 feet. If it is below 100 feet do a loop until the aircraft has landed then idle if reverser is not active. Ive also added functionality for checking that the aircraft is still on the ground and has not bumped back in the air, landIdleRepeat1 variable. When the reversers are active there should be no idling command sent. The script is attached. In my opinion this script should work but errors are awaiting when testing. First off is error at line 5 where 'end' is expected. Thr1Idle_NGX.lua.txt
  3. I've had the aircraft in slew mode and lifted it off the ground. Forgot to mention this. With the spoilers armed (keypress on the keyboard) on touchdown the spoiler handle in the sim will not go to the UP position without interruption because the TQ spoiler handle/potmeter continously sends input to the sim about its posision, just like any other joystick. Then the input from the TQ will fight aginst the aircraft logic that tries to get the handle to UP (0BD0 = 16384) because the TQ handle is delayed. If the servo for the TQ handle were not delayed the sim would constantly get interruption from input TQ/joystick/potmeter every millisecond. If I look at the spoiler handle in the sim on touchdown it goes to UP, but when the delay time (say 200ms) for the TQservo is over and the TQservo starts to move towards UP the potmeter sends a new command to the sim about its position. The handle in the sim (PMDG737NGX) obey the signal and goes back to match the TQhandle position. The sim logic again commands UP and the TQservo moves a little more towards UP then the potmeter sends its command again and so on. It results in "Spoilers do not arm" caution indicator in the cockpit as the spoiler deploy did not go as expected by the aircraft logic. And on the ground with spoilers in UP and if you increase throttle the spoilers should go to the DOWN position and they do, but not without interruption from the input from TQ/joystick as potmeter and sim logic gets their wish fullfilled in turns. (Sorry my english is not the best). To explain better first the sim gets its wish fullfilled then the potmeter gets its wish then comes the sim again and then the potmeter. There is no winner in the fight before I manually move the handle the last part of the trip to DOWN :). Connection is spoiler handle -> potmeter -> BU0836 -> FSUIPC. No other software in between. The servos are controlled by Phidgets Servo Controller card and FS2Phidgets but no input to the simulator from here. I know about nothing about LUA-scripting yet. But if I can remove the spoiler assignment from FSUIPC and LUA can do the whole job with the spoiler axis with calibration, arming, ignore input if the sim sends a command for spoiler movement. If it can do all this I will certainly look into this scripting.
  4. FSUIPC 4.836 Phidgets and FS2Phidgets for controlling servos. Im having real trouble getting the spoiler handle on my motorized throttle quadrant to cooperate with the aircraft. When the aircraft commands spoilers into a position the spoiler handle on the TQ follows its movement but then starts the problems: As the TQ handle moves it gives signals to the sim before the handle has reached its destination so when the handle is supposed to go to its UP posision it maybe only reaches half way (depending on a refresh rate setup for giving signal to the servos). If the servos didnt have any delay setup the handle would not get any way. My wish is that when the aircraft systems gives commands to the spoiler handle, input from the TQ/joystick should be ignored for a while. Can this be a functionality on FSUIPC or can I get the same result in any other way? Can LINDA help with this? Im curious how others have set up their spoiler handle functionality. About arming the spoilers I have set up the spoiler axis with the values -16040,-16040,-15467,16000 and I have also set up "Ranges for action" so that it calls the key press for arming the spoilers when in the range 14932 to 16269. Have to say Im not sure if this command is being sent as the handle immediately moves into the zone where the spoilers start to rise. It wont stay between down and deflection.
×
×
  • 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.