Lynne
08-09-2010, 06:20 AM
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
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