Jump to content
The simFlight Network Forums

Sending flight controls to FSUIPC


Recommended Posts

Hello, I've been tryin to sort this for a while but with no real success..

I have a program that during autopilot operation and thru calculations determines the target poistion of the various controls (pedals, yoke, cont column)
I want then to write these values in p3d thru fsuipc offests but seems I can't find the right combination...for example I write 0BB6 for the yoke control but seems to have no effect in p3d.

I also read in the user guide but didn0t really find an answer to my case.


Could you please address me the right way to do it?

 

Thanks

Link to comment
Share on other sites

45 minutes ago, Edoradar said:

for example I write 0BB6 for the yoke control but seems to have no effect in p3d.

0BB6 is the aileron input control, so writing to that should set the aileron position. Are you sure that you are writing to this correctly? Try monitoring that offset using FSUIPC's offset monitoring facilities (as S16). This will tell you what value the offset holds.

Also, if you have an axis assigned to the aileron. that could be overwriting the value you are setting, so check that you don't have an axis assigned to the aileron anywhere, in FSUIPC or in P3D.

Link to comment
Share on other sites

Hi John. I made sure no P3D or FSUIPC assignements exist.

In the console I can see the 0BB6 write command as expected.

what I see is that at startup or each time I enter fsuipc menu and exit, the 0BB6 goes for a moment to the value I am writing but then goes immediatly to 0.
I am sure I am writing it right as I am writing a lot of other data also and all works ok...any idea?

Edit:
I also tried to remove the keyboard assignement but no difference..is there any other offset I need to write along with it like some flag or so?

Link to comment
Share on other sites

10 hours ago, Edoradar said:

In the console I can see the 0BB6 write command as expected.

Can you show me/attach a log file please with that offset being monitored and IPC writes logging activated as well as Axis controls. Also attach your ini file.

10 hours ago, Edoradar said:

the 0BB6 goes for a moment to the value I am writing but then goes immediatly to 0.

Then something is setting it to 0 - the logging should confirm this...

11 hours ago, Edoradar said:

I also tried to remove the keyboard assignement but no difference..

What keyboard assignment?

11 hours ago, Edoradar said:

is there any other offset I need to write along with it like some flag or so?

No.

Link to comment
Share on other sites

Pleas only attach full logs, not continuation logs. You can zip/compress them if too large to attach directly.
Also, please select to sending the monitoring of offset 0BB6 to the FSUIPC log file - this is missing and would help ....
Having said that, this is what the log extract you attached shows:

Quote

   627312 WRITE0[18060]  0BB6,   2 bytes: E0 2E                                            ..
...
   627343 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= 0 (0x00000000) AXIS_AILERONS_SET
...
   627421 WRITE0[18060]  0BB6,   2 bytes: E0 2E                                            ..
...
   627453 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= 0 (0x00000000) AXIS_AILERONS_SET
...
   627531 WRITE0[18060]  0BB6,   2 bytes: E0 2E                                            ..
...
   627765 ***  AXIS: Cntrl= 65763 (0x000100e3), Param= 0 (0x00000000) AXIS_AILERONS_SET
...
etc

So something is setting the value back to 0 soon after you write to the offset. No idea what is doing this, but a full log file with that offset being monitored (and written to the log file) would help....

Link to comment
Share on other sites

On 1/8/2024 at 11:06 AM, John Dowson said:

Maybe also try assigning a button or key press to the control Offset Word Set with offset 0BB6 and parameter 12000 - does that work? If so, then there is something wrong with your code...please try this as well.

Good day John. I actually tried to do a key assignements as you instructed me. even without having my software running, the result is exactly the same. I attach the log of that for you to see.
So just to make it clear in this report my software is NOT running.

FSUIPC6.log

Link to comment
Share on other sites

On 1/8/2024 at 10:39 AM, John Dowson said:

Pleas only attach full logs, not continuation logs.

You attached a continuation log again...

This is what I see when I assign a button to change/set this offset:

Quote

   246937 Button changed: bRef=0, Joy=174, Btn=0, Pressed
   246937 [Buttons] 54=P174,0,Cx02000BB6,x2EE0
   246937 IPC Offsets Control: Ctrl=x0200, Length=2, Offset=0BB6, Param=x2EE0
   246968 Monitor IPC:0BB6 (S16) = 12000
   246968 SimRead: 0BB6="AILERON POSITION"
            FLT64: 0.73242199278
   247062 Button changed: bRef=0, Joy=174, Btn=0, Released

i.e. the button press correctly updates the simvar AILERON POSITION and the yoke moves to the position set.

This is also happening on your system but something is then sending an AXIS_AILERONS_SET control/event with a parameter of 0 directly afterwards. We need to find out what is sending this.

Can you repeat the last test please, when updating the offset assigned to a key, but this time also activate logging for Buttons & Keys and Events, and show me the full log file, NOT a continuation log, and also attach your FSUIPC6.ini file. Please also remove the offset monitoring for offset 2EF8.

If the log file is large, you can zip/compress it.

Link to comment
Share on other sites

2 hours ago, John Dowson said:

Also, what aircraft are you using? Your full log file would tell me this....if using an add-on, maybe try with another (default) aircraft to see if you  get the same issue.

Hi John. Before sending you the log,.. I took your suggestion and found out it's related to the aircraft. I am using Captain sim 767 and with it this reset to 0 happens. if I use any base aircraft it doesn't instead...you think there is a possible workaround for this or need to change the aircraft type?

Link to comment
Share on other sites

10 minutes ago, Edoradar said:

I took your suggestion and found out it's related to the aircraft. I am using Captain sim 767 and with it this reset to 0 happens. if I use any base aircraft it doesn't instead...you think there is a possible workaround for this or need to change the aircraft type?

Then it looks like that aircraft is not using (or respecting) that simvar. Instead of using the aileron simvar offset, you could try sending the AXIS_AILERONS_SET control/event instead. To use this, you need to write the value/parameter to offset 0x3114 as a 4-byte int, then write the control number, which is 65763 for AXIS_AILERONS_SET, to 0x3110 as a 4-byte int. You can also write all 8 bytes in one go if you prefer.

Link to comment
Share on other sites

On 1/10/2024 at 3:22 PM, John Dowson said:

Then it looks like that aircraft is not using (or respecting) that simvar. Instead of using the aileron simvar offset, you could try sending the AXIS_AILERONS_SET control/event instead. To use this, you need to write the value/parameter to offset 0x3114 as a 4-byte int, then write the control number, which is 65763 for AXIS_AILERONS_SET, to 0x3110 as a 4-byte int. You can also write all 8 bytes in one go if you prefer.

Hi John. this made the trick! I am able to control the plane now as you suggested. Many thanks for your help!!!!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.