Results 1 to 10 of 11
Thread: Negative V/S on LCD Display
-
12-18-2013, 09:52 AM #1
- Join Date
- Sep 2013
- Location
- Speyer, Germany
- Posts
- 191
Negative V/S on LCD Display
Hi Jean Luc,
I have one question regarding displaying the V/S on an LCD. I read the offset 0x73C7 from FSUIPC and multiple it with 100. For positive rates this works fine. But as soon as I have negative rates the values are wrong (f.e. -100 is shown as 25500, -200 is shown as 25400 etc.).
Do you have any hint for me?
Regards,
Stephan
-
12-18-2013, 11:21 AM #2
- Join Date
- Mar 2008
- Location
- France,Nice
- Posts
- 2,652
Re: Negative V/S on LCD Display
Hi,
did you use a signed byte variable?
JL
-
12-18-2013, 12:08 PM #3
- Join Date
- Sep 2013
- Location
- Speyer, Germany
- Posts
- 191
Re: Negative V/S on LCD Display
I dont think so. How can this be used?
-
12-18-2013, 12:13 PM #4
- Join Date
- Mar 2008
- Location
- France,Nice
- Posts
- 2,652
Re: Negative V/S on LCD Display
Depends on how you access the offset...
Do you use SIOC, directly FSUIPC built-in features or else??
-
12-18-2013, 12:47 PM #5
- Join Date
- Sep 2013
- Location
- Speyer, Germany
- Posts
- 191
Re: Negative V/S on LCD Display
The Software is Called ArcazeFSUIPCConnector, Reading the values directly from FSUIPC.
-
12-18-2013, 01:00 PM #6
- Join Date
- Mar 2008
- Location
- France,Nice
- Posts
- 2,652
Re: Negative V/S on LCD Display
In that case I cannot help you much more as I have no knowledge of this software.
However, I believe you must be able to choose the number of bytes of the variable to read in that software. You have to select a size of one byte. If you can select a signed or unsigned type, you need to use a signed type, as you can get negative values.
You should ask the community around your hardware solution.
JL
-
12-18-2013, 05:32 PM #7
- Join Date
- Sep 2013
- Location
- Speyer, Germany
- Posts
- 191
Re: Negative V/S on LCD Display
I was afraid you would say that
Anyway, I have tried to ask the Arcaze community, buit until now without a result. I have attached a screenshot, which shows the software that allows a BCD mode and "masking" the bytes.
Maybe you may take a lok at it?
Thx,
Stephan
Screenshot.jpg
-
12-18-2013, 05:59 PM #8
- Join Date
- Mar 2008
- Location
- France,Nice
- Posts
- 2,652
Re: Negative V/S on LCD Display
Well I guess you could expect I do not have that enough free time to add support for ALL hardware out there...
I'm sorry but your picture is unreadable for me: in German and too small at the same time...
However if you can mask bits or do some simple maths on the value, there are ways to translate an unsigned integer to a signed one:
-If you mask the bit N°7 (counting from 0) you'll always get the absolute value.
-If you can subtract 256 to the value IF the value is at or above 128, then you also get the absolute value.
Then you find a way to put a '-' sign in front of it...
Regards,
JL
-
12-19-2013, 03:35 AM #9
- Join Date
- Sep 2013
- Location
- Speyer, Germany
- Posts
- 191
Re: Negative V/S on LCD Display
Great I will try this today in the evening. Is there a documentation where I could have found this on my own?
And thank you once again for your great support.
Regards
Stephan
-
12-19-2013, 04:39 AM #10
- Join Date
- Mar 2008
- Location
- France,Nice
- Posts
- 2,652
Re: Negative V/S on LCD Display
Hi
My user guide states it is a one byte integer. As for the signed part, I thought it was obvious the V/S requires the negative part...
For the rest, google has it all.
Regards,
JL
6yo FACECAST LINK 14year GIRLS FORUM : ( )...
YWM RAR JAILBAIT ZOOM