Special direct value output request

Open a thread for a question about the simulator control software.
If you cannot receive any data in the input setup use the upper two forums!

Special direct value output request

Postby tronicgr » Wed 25. Apr 2012, 23:07

Hi,

I was developing my digital dashboard this morning and took me some time to export correctly the speed/rpm/gear data I wanted. The problem seem to be that the only math output that can be used is the g-force one and it stretches the output value to fit the size of the USO packet. Its does that resize to either 8-bit or 16-bit packets.

Is there a way to sent to USO the values of an effect untouched? 1:1 ?

For example I was using 16-bit data to sent the rpm values that range from 0-9000 and the math was stretching it to fit to the 65535 values of 16-bit!!!

BTW, here is my project, with tweaked math and USO values to get it going for now: http://www.x-sim.de/forum/blog.php?u=101&b=26&c=2


Best Regards,
Thanos
User avatar
tronicgr
 
Posts: 624
Images: 11
Joined: Tue 20. Mar 2012, 22:10
Location: San Diego, CA
Has thanked: 130 times
Been thanked: 50 times

Re: Special direct value output request

Postby sirnoname » Wed 25. Apr 2012, 23:26

- Enter the maximum in the math G-Forge plugin (2^32 because) will lead thru the input 1:1 signed, uso need a minus 2^31 to make it unsigned.
- enter there 65536 as maximum will lead thru a 16 bit value, uso will need minus 65536/2 or middle is 65536/2
- enter there 256 will lead thru a 8 bit ....

or something in this direction ...
The first scaler is the one who defines the maximum.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: Special direct value output request

Postby tronicgr » Thu 26. Apr 2012, 13:40

Thanks, I'll give it a try.
User avatar
tronicgr
 
Posts: 624
Images: 11
Joined: Tue 20. Mar 2012, 22:10
Location: San Diego, CA
Has thanked: 130 times
Been thanked: 50 times

Re: Special direct value output request

Postby tronicgr » Thu 26. Apr 2012, 22:08

Hi,

I end up using 65535 max value only in rpm. The speed could not appear correctly unless I set the max value to 104856... don't ask me how I got this number :lol:

Updated the project with this information and put a new video showing it running with only 10ms pause delay.


Anyway a different 1:1 output that provides directly the value would still be useful, so we don't have to figure out the max scale number!


Best Regards,
Thanos
User avatar
tronicgr
 
Posts: 624
Images: 11
Joined: Tue 20. Mar 2012, 22:10
Location: San Diego, CA
Has thanked: 130 times
Been thanked: 50 times

Re: Special direct value output request

Postby sirnoname » Fri 27. Apr 2012, 00:22

I thought on a button which says 1:1 and insert -2147483648 and 2147483647 in the boxes.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: Special direct value output request

Postby tronicgr » Fri 27. Apr 2012, 16:12

sirnoname wrote:I thought on a button which says 1:1 and insert -2147483648 and 2147483647 in the boxes.



I did and I get values out of range... It would work ok if I was to use the 32-bit USO packets but not 16-bit... doesn't convert it correctly at all. Can't we just skip the scale thing some how?
User avatar
tronicgr
 
Posts: 624
Images: 11
Joined: Tue 20. Mar 2012, 22:10
Location: San Diego, CA
Has thanked: 130 times
Been thanked: 50 times

Re: Special direct value output request

Postby tronicgr » Mon 30. Apr 2012, 23:32

Hi,

Here is a video that shows what I mean for the output scaler.

[ourtube]http://www.youtube.com/watch?v=q86TPrMItUs[/ourtube]


Also I figured out why I had to use different maximum for the SPEED (104856). Although the profiler shows the value in KM, it sents it to the USO as Miles! This is regarding LFS values.

Just an idea... what if could also set the size of the axis we want to use in 16-bit or 8bit?? I'm sure some outputs that represent instruments are way less that 32-bit size!


Thanos
User avatar
tronicgr
 
Posts: 624
Images: 11
Joined: Tue 20. Mar 2012, 22:10
Location: San Diego, CA
Has thanked: 130 times
Been thanked: 50 times

Re: Special direct value output request

Postby sirnoname » Tue 1. May 2012, 01:48

Although the profiler shows the value in KM, it sents it to the USO as Miles! This is regarding LFS values.

You mean the speed value in LFS is mph and not kmh? It should always be kmh!

what if could also set the size of the axis we want to use in 16-bit or 8bit?? I'm sure some outputs that represent instruments are way less that 32-bit size!

Yep, 32 bit is a little bit oversized and was designed for further projects.
But can you explain what you like to see? Buttons? Where?
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: Special direct value output request

Postby tronicgr » Thu 3. May 2012, 18:03

sirnoname wrote:
Yep, 32 bit is a little bit oversized and was designed for further projects.
But can you explain what you like to see? Buttons? Where?


Like in the following picture would be ok I guess, unless you can suggest a more suitable place.



So the extra selections for the size would be:
"8-bit" , "16-bit" and "32-bit"

and for disabling the scaling:
"Scale to fit" and "No Scale" , with "Scale to fit" option forced when 32-bit size used!

Regards,
Thanos
User avatar
tronicgr
 
Posts: 624
Images: 11
Joined: Tue 20. Mar 2012, 22:10
Location: San Diego, CA
Has thanked: 130 times
Been thanked: 50 times

Re: Special direct value output request

Postby sirnoname » Sun 6. May 2012, 22:44

I would prefere if you use OBDII interface in the future.
This interface is connected to a serial port and you can ask the OBD for its informations:
OBD Datasheet with command set
OBD II commands
This has some benefits:
1.) you do not need the converter
2.) it is compatible with real cars, this means you can find friends inside the car modding section (e.g.RS232 ELM interface + your device)
3.) there are free slots for things that are not available in OBD. For eample I added 01E0 = Gear request.

Image

Best regards
SirNoName
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Next

Return to Converter questions

Who is online

Users browsing this forum: No registered users and 2 guests