Jump to content
The simFlight Network Forums

Problem of understanding


fixair
 Share

Recommended Posts

Hi, to start with, I am a young French developer which does not speak English a lot, then I use a converter. I work on a Lark 2 which I transform into simulator. It is whom(that) that begins to clamp(stick): I decided to keep(preserve) the instruments in which I put servos or step by step engine. The problem it is the part(party) codes: I do not arrive has to extract the height, the vertical speed and the fuel by serving me as your DLL. It works well for the heading and Eng RPM. These data are sent back(dismissed) on a port(bearing) COM for a card(map) Arduino.

Could you say to me of what you think of it?

In advance thank you.

I invite you has to follow this link or you will see my Alouette 2 : www.mediafx.fr/318

Look almost everywhere and especially Panel....

FX ;op

private Offset<int> airspeed = new Offset<int>(0x02BC); // Basic integer read example

private Offset<int> rotorRpm = new Offset<int>(0x0908); // rotor rpm

private Offset<int> turbRpm = new Offset<int>(0x0896);

private Offset<Double> pressEngOil = new Offset<Double>(0x3B60);

private Offset<Double> tempEngOil = new Offset<Double>(0x3B58); private String tmpEnOil, tmpEnOilold;

private Offset<int> torque = new Offset<int>(0x08F4); private String Tork, TorkOld; // rotor torq

private Offset<int> temptur = new Offset<int>(0x08F0); private String TempTur, TempTurOld; // temp turb

private Offset<Double> banke = new Offset<Double>(0x2F78); private String Bank, BankOld; // HA_Bank

private Offset<Double> pitche = new Offset<Double>(0x2F70);private String Pitch,PitchOld; // HA_Pitch

private Offset<Double> comp = new Offset<double>(0x2B00);

private String data = "";

private Offset<Double> test = new Offset<Double>(0x3544); // test 0360 08BA

public Form1()

{

InitializeComponent();

serialPort1.PortName = "COM7";

serialPort1.BaudRate = 115200;

button9.Text = "connecter";

button10.Text = "déconnecté";

button10.Enabled = false;

..../....

private void timer1_Tick(object sender, EventArgs e)

{

// Process the default group

try

{

FSUIPCConnection.Process();

double airpeedKnots = ((double)airspeed.Value / 128d*1.852);// ias en Km/H

this.txtIAS.Text = airpeedKnots.ToString("f0");

int rotorrpm = ((int)rotorRpm.Value / (16384 / 100));

this.rotorBox.Text = rotorrpm.ToString("f1");

double Torque = ( (int)torque.Value / (16384 / 100) );

this.torqBox.Text = Torque.ToString();

Tork = "T" + Torque.ToString("f1");

if ((serialPort1.IsOpen) && (Tork != TorkOld)) { TorkOld = Tork; serialPort1.Write(Tork); };

int TempTur = ((int)temptur.Value / 16384);

this.tempturbbox.Text = TempTur.ToString();

int Bank2 = ((int)banke.Value);

this.bankBox.Text = Bank2.ToString("f1");

Bank = "B" + Bank2.ToString();

if ((serialPort1.IsOpen) && (Bank != BankOld)) { BankOld = Bank; serialPort1.Write(Bank); };

int Pitch2 = ((int)pitche.Value);

this.pitchBox.Text = Pitch2.ToString();

Pitch = "A" + Pitch2.ToString();

if ((serialPort1.IsOpen) && (Pitch != PitchOld)) { PitchOld = Pitch; serialPort1.Write(Pitch); };

int TEO = (((int)tempEngOil.Value * 140/16384)*14);

this.ToilBox.Text = TEO.ToString();

double PEO = (((double)pressEngOil.Value *55/16384)/7.25);

this.PoilBox.Text = PEO.ToString("f1");

int TR = ((int)turbRpm.Value *(100/16384));

this.rpmTurBox.Text = TR.ToString("f1");

double COMP = ((double)comp.Value);

this.capBox.Text = COMP.ToString("f0");

/////////////test

double Test = ( (double)test.Value );

this.testBox.Text = Test.ToString("f0");

data = Pitch + Bank + Tork; textBox10.Text = data;

}

..../....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.