Results 1 to 10 of 15
-
08-09-2010, 06:20 AM #1
- Join Date
- Aug 2010
- Location
- france
- Posts
- 9
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
-
08-09-2010, 06:44 AM #2
- Join Date
- Nov 2009
- Location
- France
- Posts
- 43
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.
-
08-09-2010, 07:18 AM #3
- Join Date
- Aug 2010
- Location
- france
- Posts
- 9
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
-
08-09-2010, 07:53 AM #4
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
-
08-09-2010, 09:00 AM #5
- Join Date
- Aug 2010
- Location
- france
- Posts
- 9
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
-
08-09-2010, 09:11 AM #6
- Join Date
- Aug 2010
- Location
- france
- Posts
- 9
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
-
08-09-2010, 10:37 AM #7
- Join Date
- Aug 2010
- Location
- france
- Posts
- 9
Re: Add APU in gauges written on Microsoft visual C++
I get it available free of charge as soon as I finish it
-
08-09-2010, 03:10 PM #8
Re: Add APU in gauges written on Microsoft visual C++
Great, nice to know it worked out after all!
-
08-09-2010, 04:12 PM #9
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 DepoortereFS9+PM+AST+opencockpits
-
08-09-2010, 04:45 PM #10
- Join Date
- Aug 2010
- Location
- france
- Posts
- 9
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
Similar Threads
-
Impressive F16 sim visual
By inferno in forum Cockpit Outside VisualizationReplies: 2Last Post: 07-02-2009, 12:05 PM -
What is written
By Radar in forum General Builder Questions All Aircraft TypesReplies: 3Last Post: 09-21-2008, 03:55 PM -
Visual system?
By Salud in forum Cockpit Outside VisualizationReplies: 5Last Post: 04-19-2007, 02:31 PM
Looking for Fun? Connect with Women Seeking Casual Encounters in Your Town
JH startup on Client PC