Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Aug 2010
    Location
    france
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Add APU in gauges written on Microsoft visual C++

    Hi all

    I am new to the forum and I think my approach is a little unusual, but I need your help. I do pilot not on Flight Simulator or else indeed. But my husband Yes. For this reason that I am interested and I help him in certain cases such as configuration, installation....

    I want him to do a little surprise. I found in opensource software that unites gauges them ND, PFD and LearJet 45 default written in Microsoft Visual C++ EICAS. They are well. I would like to make changes to be more functional. I already have embezzled to add avionics as "PARKING BRAKE ON / OFF" and other messages.

    My problem lies in the APU.
    I said in "short"
    I took the APURpm offset: 0x0B58
    my line is the following: FSUIPC_Read (0x0B58, 4, & APURpm & dwResult);

    FSUIPC_Process(&dwResult) APURpm must be a percentage and value max 100. I can't find how to formulate.
    The APU is included in the EICAS like this:
    glPushMatrix();
    glTranslated(.75,-.75,0);
    glScaled(.0012,.002,1);
    glColor3d(0,1,0);
    if(APURpm == -1)
    sprintf(Text, "OFF");
    else
    sprintf(Text,"%.d",APUTemp);
    glTranslated(-glutStrokeLength(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)Text),0,0);
    glutStrokeString(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)Text);
    glPopMatrix();

    if(APURpm != -1)
    {
    glPushMatrix();
    glTranslated(0,-.75,0);
    glScaled(.0012,.002,1);
    glColor3d(1,1,1);
    glutStrokeString(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)"%");
    glEnd();
    glPopMatrix();

    glPushMatrix();
    glTranslated(-.05,-.75,0);
    glScaled(.0012,.002,1);
    if(APURpm > 90)
    glColor3d(1,1,0);
    else
    glColor3d(0,1,0);
    sprintf(Text,"%.d",APURpm);
    glTranslated(-glutStrokeLength(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)Text),0,0);
    glutStrokeString(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)Text);
    glPopMatrix();

    glPushMatrix();
    glTranslated(.8,-.75,0);
    glScaled(.0012,.002,1);
    glColor3d(1,1,1);
    glutStrokeString(GLUT_STROKE_MONO_ROMAN, (const unsigned char *)" C");
    glLineWidth(1);
    glBegin(GL_LINE_LOOP);
    Math.DrawArc(-160,100,30,0,360);
    glEnd();
    glLineWidth(2);
    glPopMatrix();
    }

    I am using FS9 and FSX

    I really need help.
    Sorry for my english

    Lyne

  2. #2
    25+ Posting Member
    Join Date
    Nov 2009
    Location
    France
    Posts
    43
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    Hello Lyne,

    According to my doc, APU RMP offset is 0B54 (not B58 !). Perhaps it is the cause of your problem.

    Cordialement.

    Patrick.

  3. #3
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Aug 2010
    Location
    france
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    Hello Patrick

    Thanks for your answers. You're right the good offset in "...54".
    But for using it, I am lost. The description is percent , 100=max. How can you write this indication ?

    Tank you

    Lynne

  4. #4
    75+ Posting Member Adino's Avatar
    Join Date
    Oct 2006
    Location
    Curacao, NA
    Posts
    85
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    Im not sure I understand what is being asked here but the simplest will be to convert whatever is coming from the offset for APURPM to percentage as the decription is saying, (something like * 100, if the value is a floating nr needed to be converted to %, or *.01 if the value is a percentage to be converted to a floating one)...but again I dont fully understand so excuse my two cent comment
    Adino


    Citation XLS sim
    http://c560xl.webs.com/

  5. #5
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Aug 2010
    Location
    france
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    I saw my error.
    APURpm must be define in float and not in short. In Result :
    FSUIPC_Process(&dwResult) => DataSource.Aircraft.APURpm = APURpm;

    It's working now, but it's stay at 99 % at the end instead of 100 %.

    Thanks

    Lyne

  6. #6
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Aug 2010
    Location
    france
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    EICAS - APU ON.jpg EICAS - APU OFF.jpg

    Here are the EICAS.

    It's working only with FSX

    Lyne

  7. #7
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Aug 2010
    Location
    france
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    I get it available free of charge as soon as I finish it

  8. #8
    75+ Posting Member Adino's Avatar
    Join Date
    Oct 2006
    Location
    Curacao, NA
    Posts
    85
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    Great, nice to know it worked out after all!
    Adino


    Citation XLS sim
    http://c560xl.webs.com/

  9. #9
    150+ Forum Groupie pdpo's Avatar
    Join Date
    Nov 2005
    Location
    belgium
    Posts
    260
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    Hi Lyne,

    are these Fs gauges or this is a standalone program?

    es ce que ce sont des Fs gauges or c'est un programme seule.

    Thanks , Merci
    Peter Depoortere
    FS9+PM+AST+opencockpits

  10. #10
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Aug 2010
    Location
    france
    Posts
    9
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Add APU in gauges written on Microsoft visual C++

    Hi,

    It's a standalone program. I hope I will finish as soon as possible.

    Lyne

Page 1 of 2 12 LastLast

Similar Threads

  1. Impressive F16 sim visual
    By inferno in forum Cockpit Outside Visualization
    Replies: 2
    Last Post: 07-02-2009, 12:05 PM
  2. What is written
    By Radar in forum General Builder Questions All Aircraft Types
    Replies: 3
    Last Post: 09-21-2008, 03:55 PM
  3. Visual system?
    By Salud in forum Cockpit Outside Visualization
    Replies: 5
    Last Post: 04-19-2007, 02:31 PM