Jump to content
The simFlight Network Forums

Landing lights offset


Recommended Posts

Hi,

Tried to find it in the 'FSUIPC4 Offsets Status' documentation, but it is not there.

So may I inquire what is the actual FSUIPC offset for the Landing lights movements?

I mean:

LANDING_LIGHT_DOWN 65863

LANDING_LIGHT_HOME 65866

LANDING_LIGHT_LEFT 65864

LANDING_LIGHT_RIGHT 65865

LANDING_LIGHT_UP 65862

thanks in advance

Achoriham

Link to comment
Share on other sites

There's no offset mapped to control directional landing lights. You have to use the controls, if they work on the aircraft you are using. Send them via offset 3110.

Hi Pete,

Many thanks for the info.

Unfortunately I can't do that. I have a small Phidgets joystick connected to a Phidgets analog port and there I'm using fs2phidgets to handle the offsets.

The program can handle 8 byte words but I can't separate the first 4 bytes to send the control no. and the actual parameters in the second one. So I will try to look up another solution for that.

best regards

Achoriham

Link to comment
Share on other sites

The program can handle 8 byte words but I can't separate the first 4 bytes to send the control no. and the actual parameters in the second one. So I will try to look up another solution for that.

First, I don't think the controls you mention take parameters, do they? Aren't they simple inc/dec type controls?

Second, if it can send a "Quadword" (an 8 byte integer) then it's merely a matter of computation on your part to compute that from the two parts. Or do you mean a floating point 64-bit value, which of course is certainly not appropriate?

Third, why not send the parameter first then the control value. The action is only triggered on the latter.

Regards

Pete

Link to comment
Share on other sites

First, I don't think the controls you mention take parameters, do they? Aren't they simple inc/dec type controls?

Second, if it can send a "Quadword" (an 8 byte integer) then it's merely a matter of computation on your part to compute that from the two parts. Or do you mean a floating point 64-bit value, which of course is certainly not appropriate?

Hi Pete,

Thanks for the advice.

Unfortunately it is a program (which handles Phidgets hardware) that is able to handle the 8 bytes, but the only thing I can define there is either a boolean operation or as it names it: a 'proportional' one, which then sends values to the FSUIPC offset.

As I wanted to use a mini-joystick for the purpose (with 2 axes both giving values from 0 to 1000) those numbers are the only thing I can send.

Third, why not send the parameter first then the control value. The action is only triggered on the latter.

Because I can't do anything else in the program but define the FSUIPC offset and the data type. No possibility is there to do anything sequential.

thanks and regards

Achoriham

Link to comment
Share on other sites

Because I can't do anything else in the program but define the FSUIPC offset and the data type. No possibility is there to do anything sequential.

Okay. In that case the easiest thing to do is as follows:

1. Write the values for each parameter to your own assigned user offsets. 66C0 - 66FF are available.

2. Write a small Lua plug-in which processes changes in those offsets and sends the controls for you.

3. Save the plug-in as "ipcReady.lua" so it starts when FS is ready to fly and stays running.

The Lua involved would only be something like this, repeated for each offset and control:

function lightdown(off, val)  -- change name for each action
 	ipc.control(65863, val)   -- change control number for each action
end

event.offset(0x66C0,  "lightdown")   -- change offset and function name for each action

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.