Tiberiu Posted November 6, 2005 Report Posted November 6, 2005 Gentlemen, I am trying to get FSUIPC to access TCAS data. I have tried this code in my gauge, but for some reason the TCAS data is empty. I checked with TrafficLook.exe,a nd there are aircraft nearby. //In PANEL_SERVICE_PRE_INITIALIZE FSUIPC_Open2(FSReq, &Result, Mem, Size); //where I have these declarations right above the case statement DWORD FSReq = SIM_ANY; DWORD Result; BYTE Mem[1024]; DWORD Size=1024; //in PANEL_SERVICE_PRE_UPDATE FSUIPC_Read (0xE080, 96 * sizeof(TCAS_DATA), (BYTE *) ground, &Result); FSUIPC_Read (0xF080, 96 * sizeof(TCAS_DATA), (BYTE *) airborne, &Result); FSUIPC_Process(&Result); Sincerely, Tiberiu Brasov
ddawson Posted November 6, 2005 Report Posted November 6, 2005 The TCAS_DATA structure is 40 bytes in size. You are attempting to read a data block consisting of of 96 of these structures - that's 3840 bytes for each of each of the FSUIPC reads. You have only allocated 1024 bytes for FSUIPC to work with. Increase the allocation accordingly. Doug
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