Masterius Posted August 24, 2019 Report Posted August 24, 2019 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.
Gypsy Baron Posted August 24, 2019 Report Posted August 24, 2019 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
Pete Dowson Posted August 25, 2019 Report Posted August 25, 2019 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
Masterius Posted August 25, 2019 Author Report Posted August 25, 2019 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
Thomas Richter Posted August 25, 2019 Report Posted August 25, 2019 Hi, did you not look up those in FSUIPCx Offset Status.pdf? Thomas Quote 088C 2 Engine 1 Throttle lever, –4096 to +16384 0890 2 Engine 1 Mixture lever, 0 – 16384
Masterius Posted August 25, 2019 Author Report Posted August 25, 2019 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.
Pete Dowson Posted August 25, 2019 Report Posted August 25, 2019 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now