Puttipong Suphunnakul Posted January 4, 2016 Report Share Posted January 4, 2016 Hi pete As this topic i have read about offset , EVENT and i can program C# to PMDG 737 So could you tell me or show me ex code to help me Thank you. Link to comment Share on other sites More sharing options...
Pete Dowson Posted January 6, 2016 Report Share Posted January 6, 2016 As this topic i have read about offset , EVENT and i can program C# to PMDG 737 So could you tell me or show me ex code to help me Thank you. Sorry, I don't know C#. Isn't the example of the interface in the SDK of use? Once you know which offset to use, what would be the problem? Have you considered using Paul Henty's .NET DLL? It makes such things much easier -- see the SubForum about this, above. Pete Link to comment Share on other sites More sharing options...
Hikmat Posted January 6, 2016 Report Share Posted January 6, 2016 Hi Pete, I am trying to read HDG but got some fantastic number like 121823238 however I can read speed and altitude normally. Could you please help me to solve this issue ? my delphi code is : procedure TFormMain.TimerUpdateTimeTimer(Sender: TObject); var dwResult : DWORD; auiTime : Array[1..3] of Byte; altitude:DWord; IAS: DWord; G_force: DWord; St: DWord; HDG: DWord; begin FSUIPC_Read($3324, 8, @altitude, dwResult); // FSUIPC_Read($02BC, 4, @IAS, dwResult); // FSUIPC_Read($11BA, 4, @G_force, dwResult); FSUIPC_Read($0580, 4, @HDG, dwResult); // FSUIPC_Process(dwResult); Label4.Caption := IntToStr(round(altitude )) + ' ft'; Label5.Caption := IntToStr(round(IAS / 128)) + ' kt'; Label6.Caption := IntToStr(round( G_force/625)); Label7.Caption := IntToStr(round(HDG*360/65536*65536)); Thanks in Advance Hikmat Link to comment Share on other sites More sharing options...
Pete Dowson Posted January 7, 2016 Report Share Posted January 7, 2016 I am trying to read HDG but got some fantastic number like 121823238 however I can read speed and altitude normally. Could you please help me to solve this issue ? ... Label7.Caption := IntToStr(round(HDG*360/65536*65536)); The arithmetic operations / and * have the same priority, so are obeyed left to right -- so you are getting ((HDG * 360) / 65356) * 65536 You need to use parentheses exactly as shown in the dox. Pete Link to comment Share on other sites More sharing options...
Hikmat Posted January 7, 2016 Report Share Posted January 7, 2016 Thanks Peter Dowson fixed best regards Hikmat Seyidov Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now