MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
riveroalbert
Posts: 4
Hello!
First of all, I've had success on configuring an encoder with MFS2020 to control the heading, and it is great! I first used FSUIPC Offset (and $+-182) but it was giving me trouble in 180º (i now found you need to set it to 4 byte) so I ended up using an EventID.

However, I am unable to find a way to control the push/pull functions of the knobs in the A320 (heading, speed, altitude...) to change between selected and managed mode.

Although this might be more a question for FSUIPC7 I'm wondering if there is any EventID or FSUIPCOffset to control this "pull or push" function of the encoders.

I'm sure it has to do something with the HEADING_BUG_SET offset in case of the heading but I cannot get it to work... Is there a way to to move the visible heading bug without instantly updating the autopilot's heading hold function?

Thanks a lot!
[Last edited by riveroalbert, 2021-02-07 14:10]
2021-02-07 13:36
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4339
Supporter
Hi

As i know this function is still not implement in FSUIPC ( maybe meanwhile it is.... i don´t know in case i not active use it)
Same problem with many other "new" systems of FS2020 cause FSUIPC7 at first only inlcude stuff that was possible in P3D also. Means new things are missed maybe already.

To solve Sebastian impelment in the new version a new typ of Input.... "FS2020 Simconnect"
These are "Events" that are directly from the sim ( No FSUIPC usage) . Maybe the needed is still included. If not you can incude it yourself by editing the WASM Module.

Check the Discord and Youtube Channel. Lots of other user still work with it. ( I can not help cause i not use FS2020)


*******************

Important Note:

You should understand what you do before you start up!
iconriveroalbert:

I first used FSUIPC Offset (and $+-182) but it was giving me trouble in 180º (i now found you need to set it to 4 byte) so I ended up using an EventID.



Thats fully wrong and against all rules !

YES its correct that the 180° Problem is solved if you change into 4 Bytes.... But this is just optical and temporary.... It will not Work at all !

In easy words.... If you learn and understand, WHY the setting to 4 Byte solve the Signed Bug..... then you also know why this is wrong and can not work finaly !
Good Luck !
2021-02-07 19:54
Avatar
riveroalbert
Posts: 4
Hi! I will have a look at FS2020 Simconnect! Many thanks!

iconpizman82:

Hi
Important Note:
You should understand what you do before you start up!

iconriveroalbert:

I first used FSUIPC Offset (and $+-182) but it was giving me trouble in 180º (i now found you need to set it to 4 byte) so I ended up using an EventID.


Thats fully wrong and against all rules !
YES its correct that the 180° Problem is solved if you change into 4 Bytes.... But this is just optical and temporary.... It will not Work at all !
In easy words.... If you learn and understand, WHY the setting to 4 Byte solve the Signed Bug..... then you also know why this is wrong and can not work finaly !



You are totally right! I understand the sim translates the heading in 2 bytes (65535 numbers) but it can be unsigned or signed (-32768 to 32767) and 65535 is converted to degrees dividing in 360. So yeah, setting it to 4 byte doesn't make much sense really... was more of a desperate solution haha.
I'll check the documentation on how to put a transform funtion into "Set value"... like if the value is <0,$+65535 or something.

Thanks
[Last edited by riveroalbert, 2021-02-08 10:57]
2021-02-08 10:52
Avatar
riveroalbert
Posts: 4
OKay, I managed to get the heading to work using a FSUIPC by solving the "break issue" between 179 and 180 degrees due to the signed 2-byte.

If its of any use to anybody:

Left: if($=-32768,32767,$-182)
Right: if($=32586,-32767,$+182)

Checking the logbook of FSUIPC however, MFS2020 uses the Heading_Bug_Dec and Heading_Bug_Inc when you turn the heading with your mouse

Thanks anyway
2021-02-08 14:44
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4339
Supporter
I see you undertand.... Math and Informatics are no magic if you understand them !

So you also know now..... Range go from 0-65535 ..... And in case of Signed/Unsigned we got the "negative" Problem at 180°
If you "cheat" and use 4 Bytes..... Then it solve "temporary" the Problem cause Offset Value already goes from 0-65535 .....
Now the Signed/Unsigned Swap Point would be at 2.147.483.647 so far far away from our 65535 Max Value

BUT Lets look in the Offset List .

iconQuote:

07CC 2 Autopilot heading value, as degrees*65536/360
07D0 4 Autopilot altitude lock


If you "cheat" and increase simply the Offset Size to 4 Byte then your Config will read 2 Bytes of 07CC and also behind the Bytes 07CE and 07CF
Funny Fact.... In this case it would work ! Cause these 2 Bytes are not used by a "coincidence" ... The next used Offset is 07D0.

But now look a little below.....
iconQuote:

07E2 2 Autopilot airspeed value, in knots
07E4 4 Autopilot mach hold


Here the First Offset have 2 Byte.... And there is no "free Area behind" .... After the 2 BYte 07E4 start !
If you cheat here.... Then your Config will read 07E4 AND by fault it would also read the 1/0 Data of the first 2 Bytes of the Mach Hold Switch.


********************
Summary:
I must say apollogy.... Cause in case the offsets behind the AP Heading are Empty your fully right.... Swap to 4Byte INT solve the Unsigned Bug without any disadvantage !
But same time my comment was correct.... This can not be done at all time.... Only work in this example in case of pure luck !
Good Luck !
2021-02-08 15:05
Avatar
riveroalbert
Posts: 4
Thanks, much appreciated
2021-02-09 12:39
icon