#Handling input axes (another value than 1024) and PMDG 737 V/S values

1 messages ยท Page 1 of 1 (latest)

robust geyser
#

Hi,

I dont know how to exactly use axes in my Thrustmaster TCA Throttle for communicating with MSFS.
Let me explain first the issue:

What do I have?

  1. I have some arduino boards and some devices such thottle with flaps, yoke etc connected to the PC.
  2. I want to use this devices to communicate with MSFS via mobiflight instead build-in msfs settings because this is simpler to change profiles in mobiflight and use every same device for many planes.

What did i do?
I want to make one of thrustmaster's tca throttle quadrant axis work with MSFS PMDG 738 flaps. One on axes is used for flaps and I have done detents (with 3d printing) there. Only need to make it work with mobiflight.

How is it working now on this config (look screenshot)?
Right now axis is working only in first 2milimeters of its range. If i move 1% of real axis it makes about 50% movement in PMDG. So the REAL value from axis is propably half of possible values in PMDG. I have checked and propably pmdg is working with 0-1023 values. My axis is sending 0-65000 values (something about it).

What should i do? Can I make something like dividing real value before sending it to simulator? Or specify my range of axis somewhere in mobiflight?

digital nexus
#

the potentiometer presets are already prepared for an input range of 0-1024 because that's what you get from the arduino

#

that's basically what the first instructions on the preset do

#

@ 20 - 10.03 / near 0 max 100 min, this basically normalizes it to the range of 0-100

#

so you have to adjust the first part

gritty scroll
#

yes, change where it says 10.03 to 655.35

digital nexus
#

does he need the -20

gritty scroll
#

its not going to make any difference in 65K

digital nexus
#

@ 65535 / should do it

gritty scroll
#

no, more like @ 655.35 /

#

the rest of the code expects a value 0 to 100 as you indicated.

digital nexus
#

yeah sure, * 100 was missing ๐Ÿ˜…

robust geyser
#

Oh, I didnt saw that fast respond! thanks! Going for testing but... im a programmer, can you simply tell me what all this variables doing?

#

For example if I would like use it in future for some other things. What does exactly means "@"?

gritty scroll
#

placeholders can actually be any ascii character, but because placeholder substitution is done before formula evaluation, the substitution process will blindly replace any placeholder it finds, so you should not use placeholders that are part of your formula... for example do not use i or f because you use them in an if statement.

robust geyser
#

Ah that it means. Thank you! So... @ 655.35 / near 0 max 100

Means (value from potentiometer) x 655.35 ?

gritty scroll
#

it is RPN syntax so operands come first then the operator

#

it means pot value divided by 655.35

#

near is the round function

#

0 max 100 min is a range filter to ensure you are within those values

robust geyser
#

Will it work that way? (msfs is loading)

gritty scroll
#

unfortunately, the MF mangles the code a bit in the code box

#

there is a fix already waiting to be published

robust geyser
#

Hm, so none from your answers above will not work?

gritty scroll
#

can you please copy the code to Notepad++ and repost

robust geyser
#

even "@ 65535 /" ?

#

Sure

#

@ 655.35 / near 0 max 100 min s0
l0 5 < if{ 714101 (>K:ROTOR_BRAKE) quit }
l0 15 < if{ 714201 (>K:ROTOR_BRAKE) quit }
l0 35 < if{ 714301 (>K:ROTOR_BRAKE) quit }
l0 50 < if{ 714401 (>K:ROTOR_BRAKE) quit }
l0 64 < if{ 714501 (>K:ROTOR_BRAKE) quit }
l0 75 < if{ 714601 (>K:ROTOR_BRAKE) quit }
l0 85 < if{ 714701 (>K:ROTOR_BRAKE) quit }
l0 98 < if{ 714801 (>K:ROTOR_BRAKE) quit }
714901 (>K:ROTOR_BRAKE)

digital nexus
#

it's released in the most recent beta

gritty scroll
#

as I mentioned, the code coming from Hubhop is not handled correctly in the code box

digital nexus
#

you can try that

gritty scroll
#

ahh ok great

#

yes, that looks ok now

robust geyser
#

Im waiting for PMDG creating a new files after update, as always it takes some time ๐Ÿ˜„ And we will know in few minutes.

gritty scroll
#

nice

robust geyser
#

I have build this baby last week (from 737 diy) - that was the moment when I have met Mobiflight first time ๐Ÿ˜„ Nice piece of software

gritty scroll
#

I have been working on mine for over four months now... still unfinished.

#

but it is my own design

robust geyser
#

I know this pain, the longest period of time takes soldering but if you are making your own project

#

propably used most of the time for 3d designing

#

About the topic - it is working ๐Ÿ˜„ But need to fine tune ๐Ÿ˜‰ Flaps 15 and 25 are not ideally aligned with axis

gritty scroll
#

actually no, I had to wait twice for about a month for parts from Aliexpress and now I got distracted with another project I am finishing. It is been dormant for one month already.

robust geyser
#

You have ordered KD22 buttons from china?

#

I have waited 1 month for them ๐Ÿ˜

gritty scroll
#

no, I ordered those from amazon a long time ago

robust geyser
#

๐Ÿ˜„

gritty scroll
#

i had o wait for 7 segment modules with the socket mounted digits

#

so I could replace the digits and rewire for the different displays

#

I do all my projects hand wired... I have not gotten into PCB making yet

robust geyser
#

Nice! My project dont have a PCB - it have two 3d printed panels, front and back panel - so all things are mounted to backpanel and front panel is just hiding all screws etc.

#

propably you have seen 737diy project - there is many smart solutions but unfortunatelly not all buttons are in their real places

#

For example Vnav is lower because 7 segment display is taking a place for it.

gritty scroll
#

ok, adjusting values in the code to get to the correct positions should be very easy.

robust geyser
#

It is ๐Ÿ˜‰

#

I need only to get rid with V/S LCD not showing negative values

gritty scroll
#

for that you use fsuipc offset 0x65D0

robust geyser
#

I was reading about changing some values in fsuipc but i dont understand what they are writing about

#

Oh, you know how to do that?

gritty scroll
#

it is a well known issue with this airplane

robust geyser
#

Here?

gritty scroll
#

no, in mobiflight

#

just select fsuipc offset

#

in the output config Sim variable tab

robust geyser
#

like that?

gritty scroll
#

it is 2 bytes IIRC

#

but yes, that way

robust geyser
#

And thats, all? Seriously? lol ๐Ÿ˜„

gritty scroll
#

yep

#

of course you need to have EnableDataBroadcast in the 737options.ini file

robust geyser
#

I have ๐Ÿ˜„

gritty scroll
#

you are good to go

robust geyser
#

going for testing

#

Hmmmmmmm

#

Mobiflight see -400 as output value but i have 0

gritty scroll
#

show your output config for VS

robust geyser
#

Maybe do I need something here?

gritty scroll
#

this is not a led... it's a led module

robust geyser
#

damn haha wait

#

It works now, i have changed it in wrong position ๐Ÿ˜„ In the led not Led display as you mentioned

#

Man - you have solved all my problems in single conversation lol ๐Ÿ˜„ Tell me last thing - how can i set for example - if PMDG display show no value (empty) - my display is showing 0 insteed nothing. How to make it work? ๐Ÿ˜„

#

Should I use any precondition settings?

gritty scroll
#

make a Transform

#

if($=0,' ',$)

robust geyser
gritty scroll
#

Compare will work too

robust geyser
#

I make it working like that ๐Ÿ˜„ if current value is -16960 (thats the value if is turned off) then set it to space

gritty scroll
#

always enclose strings in single quotes

robust geyser
#

Thanks! ๐Ÿ˜„

gritty scroll
#

if($=0||$=-16960,' ',$)

robust geyser
#

Handling input axes (another value than 1024) and PMDG 737 V/S values

#

I have changed topic name for any others searching for it ๐Ÿ˜„

rustic lichen
gritty scroll
#

#1071821318439309413 message