Jump to content
The simFlight Network Forums
Sign in to follow this  
Masterius

general use offsets behaving oddly

Recommended Posts

Up until this week I've had no difficulties using the offsets 66C0 thru 66FF (although I've only used about 10 so far). However, now it seems I can no longer write values to the unused ones, and in tracking down possible reasons I've also noticed the unused offsets holding values, and also responding to other assigned axis. For instance, I have one axis assigned to 0x66C1, but 0x66C2 also responds, but not not identically: the axis outputs the value of -16383 to 16383 to 0x66C1, but -293 to 63 to 0x66C

I'm running both LINDA 3.0.12 and FSUIPC4 4.974 on Windows 7. 

Share this post


Link to post
Share on other sites

It just occurred to me that you have an  axis assigned to 0x66C1. The axis is a 32 bit number and most likely it requires both 0x66C1 and 0x66C2 to hold the actual data. You probably should be writing/reading a signed word using an EVEN offset such as 0x66C0/C1 or 0x66C2/C3

Paul

Share this post


Link to post
Share on other sites
13 hours ago, Masterius said:

Up until this week I've had no difficulties using the offsets 66C0 thru 66FF (although I've only used about 10 so far). However, now it seems I can no longer write values to the unused ones, and in tracking down possible reasons I've also noticed the unused offsets holding values, and also responding to other assigned axis. For instance, I have one axis assigned to 0x66C1, but 0x66C2 also responds, but not not identically: the axis outputs the value of -16383 to 16383 to 0x66C1, but -293 to 63 to 0x66C

Each byte contains only 8 bits, and can take signed values of -128 to +127 or an unsigned value from 0 to 255.

Axis values are usually 16 bits, so need 2 bytes or 16 bits, which would accommodate a range signed -32768 to +32767, or unsigned 0 to 65535..

To split 66C0-66FF into 2 byte values you can only use every other byte: 66C0, 66C2, 66C4 and so on.

Please take a look at this FAQ subforum thread:

Pete

 

Share this post


Link to post
Share on other sites

Thank you both for your replies. I've spread the axis across the board, giving space between them (ex. using 66C1, 66C4, 66C7, etc) and that seems to have fixed the overlapping writes. Now I just need to figure out how to start the offsets at certain values (for instance, mixture at idle cutoff, turbo at zero . . . that sort of thing).

Thanks again!

 

Al

Share this post


Link to post
Share on other sites
1 hour ago, Thomas Richter said:

Hi,

did you not look up those in FSUIPCx Offset Status.pdf?

Thomas

 

Perhaps I did not explain better. What I meant was, how do I have certain controls, like mixtures, turbo, fuel pump, etc, start at pre-defined positions? For example, start off with turbo at zero, mixture levers at idle cutoff (zero). Basically, have an .ini file to preset offsets and Lvars.

 

 

Share this post


Link to post
Share on other sites
20 minutes ago, Masterius said:

Perhaps I did not explain better. What I meant was, how do I have certain controls, like mixtures, turbo, fuel pump, etc, start at pre-defined positions? For example, start off with turbo at zero, mixture levers at idle cutoff (zero). Basically, have an .ini file to preset offsets and Lvars.

You'd best have a Lua plug-in to write your preserred values. If to offsets use ipc.writeUW or ipc.writeSW, or you could use ipc.control to sent the relevant AXIS controls with a parameter definiing the position (there's a list of controls provided in a pdf). For LVars you use ipc.writeLvar. See the Lua library reference document.

Pete

 

Share this post


Link to post
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...
Sign in to follow this  

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