Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    150+ Forum Groupie
    Join Date
    Sep 2013
    Location
    Speyer, Germany
    Posts
    192
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  2. #2
    2000+ Poster - Never Leaves the Sim
    Join Date
    Mar 2008
    Location
    France,Nice
    Posts
    2,429
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Negative V/S on LCD Display

    Hi,

    did you use a signed byte variable?

    JL

  3. #3
    150+ Forum Groupie
    Join Date
    Sep 2013
    Location
    Speyer, Germany
    Posts
    192
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Negative V/S on LCD Display

    I dont think so. How can this be used?

  4. #4
    2000+ Poster - Never Leaves the Sim
    Join Date
    Mar 2008
    Location
    France,Nice
    Posts
    2,429
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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??

  5. #5
    150+ Forum Groupie
    Join Date
    Sep 2013
    Location
    Speyer, Germany
    Posts
    192
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Negative V/S on LCD Display

    The Software is Called ArcazeFSUIPCConnector, Reading the values directly from FSUIPC.

  6. #6
    2000+ Poster - Never Leaves the Sim
    Join Date
    Mar 2008
    Location
    France,Nice
    Posts
    2,429
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  7. #7
    150+ Forum Groupie
    Join Date
    Sep 2013
    Location
    Speyer, Germany
    Posts
    192
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  8. #8
    2000+ Poster - Never Leaves the Sim
    Join Date
    Mar 2008
    Location
    France,Nice
    Posts
    2,429
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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 N7 (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

  9. #9
    150+ Forum Groupie
    Join Date
    Sep 2013
    Location
    Speyer, Germany
    Posts
    192
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

  10. #10
    2000+ Poster - Never Leaves the Sim
    Join Date
    Mar 2008
    Location
    France,Nice
    Posts
    2,429
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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

Page 1 of 2 12 LastLast