Jump to content
The simFlight Network Forums

Jesse de Vroet

new Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Jesse de Vroet

  1. I understand that you don't have all the information that you need to solve my problem. To be more precise, the data coming from offsets 034E, 0350, 311A and 311E is, following the manual, in BCD-format. Now I try to store that data as string, then I try to convert that to a integer to gain the posibillity to edit the value further on in my program. So the conversion from the raw data from FSUIPC to the integer in my program is not working. I see they can make a raw- to calculated data conversion in the FSUIPC data monitor I bought, so for me, it seems possible. Can anyone please help me how I should do it? Thanks in advance, Jesse
  2. Hello developers (and Pete offcourse!), I'm currently busy programming for FSUIPC via Lazarus/Delphi. I'm building a program which is able to read and change radio frequencies from FSUIPC, and will eventually be controllable via Arduino. Currently the program doesn't work and it states an error about the offset is not an integer..., but it did work in the past (most of the time some frequencies work, and other don't). It seems to be a data-conversion issue, which seems to be different every time I start FS. I know that the offset-data is in BCD format. Can anyone please help me out with the conversion? procedure TFormMain.FormCreate(Sender: TObject); var dwResult : DWORD; begin // Verbinding maken met FSUIPC if FSUIPC_Open(SIM_Any, dwResult) then begin // Status wanneer verbonden tonen Lbl_FSUIPC_Conn_status.Caption := 'Connected' end else begin // Status wanneer niet verbonden tonen Lbl_FSUIPC_Conn_status.Caption := 'Not connected' end; end; procedure TFormMain.TimerRefreshDataTimer(Sender: TObject); var dwResult : DWORD; int_COMM1_Active_FS_frequency, int2_COMM1_Active_FS_frequency, int_NAV1_Active_FS_frequency, int2_NAV1_Active_FS_frequency, int_COMM1_Standby_FS_frequency, int2_COMM1_Standby_FS_frequency, int_NAV1_Standby_FS_frequency, int2_NAV1_Standby_FS_frequency: integer; str_COMM1_Active_FS_frequency, str_NAV1_Active_FS_frequency, str_COMM1_Standby_FS_frequency, str_NAV1_Standby_FS_frequency : string; begin // COMM1 Active uit FS lezen if FSUIPC_Read($034E, 2, @int_COMM1_Active_FS_frequency, dwResult) then begin // "Read" voltooid, dan: if FSUIPC_Process(dwResult) then begin // "Process" wanneer voltooid, dan: str_COMM1_Active_FS_frequency := IntToHex(int_COMM1_Active_FS_frequency,1); int2_COMM1_Active_FS_frequency := StrToInt(str_COMM1_Active_FS_frequency); int2_COMM1_Active_FS_frequency := 10000 + int2_COMM1_Active_FS_frequency; Lbl_COMM1_Active_frequency.Caption := IntToStr(int2_COMM1_Active_FS_frequency); end end; // NAV1 uit FS lezen if FSUIPC_Read($0350, 2, @int_NAV1_Active_FS_frequency, dwResult) then begin // "Read" voltooid, dan: if FSUIPC_Process(dwResult) then begin // "Process" wanneer voltooid, dan: str_NAV1_Active_FS_frequency := IntToHex(int_NAV1_Active_FS_frequency,1); int2_NAV1_Active_FS_frequency := StrToInt(str_NAV1_Active_FS_frequency); int2_NAV1_Active_FS_frequency := 10000 + int2_NAV1_Active_FS_frequency; Lbl_NAV1_Active_frequency.Caption := IntToStr(int2_NAV1_Active_FS_frequency); end end; // COMM1 Standby uit FS lezen // COMM1 Standby uit FS lezen if FSUIPC_Read($311A, 2, @int_COMM1_Standby_FS_frequency, dwResult) then begin // "Read" voltooid, dan: if FSUIPC_Process(dwResult) then begin // "Process" wanneer voltooid, dan: str_COMM1_Standby_FS_frequency := IntToHex(int_COMM1_Standby_FS_frequency,1); int2_COMM1_Standby_FS_frequency := StrToInt(str_COMM1_Standby_FS_frequency); int2_COMM1_Standby_FS_frequency := 10000 + int2_COMM1_Standby_FS_frequency; Lbl_COMM1_Standby_frequency.Caption := IntToStr(int2_COMM1_Standby_FS_frequency); end end; // NAV1 Standby uit FS lezen if FSUIPC_Read($311E, 2, @int_NAV1_Standby_FS_frequency, dwResult) then begin // "Read" voltooid, dan: if FSUIPC_Process(dwResult) then begin // "Process" wanneer voltooid, dan: str_NAV1_Standby_FS_frequency := IntToHex(int_NAV1_Standby_FS_frequency,1); int2_NAV1_Standby_FS_frequency := StrToInt(str_NAV1_Standby_FS_frequency); int2_NAV1_Standby_FS_frequency := 10000 + int2_NAV1_Standby_FS_frequency; Lbl_NAV1_Standby_frequency.Caption := IntToStr(int2_NAV1_Standby_FS_frequency); end end; end; I hope you can help me with my problem! Jesse
  3. Hello, since I want to dive into programming for Flight Simulator 2004 via Delphi or Visual Basic, was browsing trough the SDK. With FSUIPC v3.999z8 installed in FS2004 (clean install), I tried some example-programs from the SDK, but they all don't seem to connect to FSUIPC. When I start, for example, the Delphi .exe (UIPChello) file, it reads "incorrect version of FSUIPC, or not FSUIPC". I both start FS and the UIPChello with administrator rights. Can you please help me? I can't figure out what i'm doing wrong here! Greetz, Jesse Rotterdam, the Netherlands
×
×
  • 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.