Jump to content
The simFlight Network Forums

aaj280174

new Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by aaj280174

  1. Hi Pete! Now this problem appeared in the reading. When I run the 0x580 offset reading the following happens: I have the Cessna 330 degrees of the bow and reading in c + + -571588881 output appears as shown in the log FSUIPC 3723378415. Thanks
  2. Hi pete! All understood I'm really at a basic level of programming, sorry. It worked perfectly after modifying the code, thank you. Junior
  3. Hi Pete! I'm trying to read the heading offset 0x580 in C + +. Based on the examples you provide in the FSUIPC SDK, there you proceed to read from offset 0x238, 0x239 and 0x23a. But with any other offsets always results in the same display in Printf 2293232. My idea is to collect and send the offset to a serial port which will control a pic showing the position of the servo gauge. Everything is ready, the difficulty is in reading the same offset. There is some code to release the offset gauge?. Recently got the key FSUIPC. Thanks Junior #include "stdafx.h" #include <time.h> #include <windows.h> #include "FSUIPC_User.h" #include "IPCuser.h" char *pszErrors[] = { "Ok", "Attempt to Open when already Open", "Não foi possível o link com o FSUIPC", "Failed to Register common message with Windows", "Failed to create Atom for mapping filename", "Failed to create a file mapping object", "Failed to open a view to the file map", "Incorrect version of FSUIPC, or not FSUIPC", "Sim is not version requested", "Call cannot execute, link not Open", "Call cannot execute: no requests accumulated", "IPC timed out all retries", "IPC sendmessage failed all retries", "IPC request contains bad data", "Maybe running on WideClient, but FS not running on Server, or wrong FSUIPC", "Read or Write request cannot be added, memory for Process is full", }; if (FSUIPC_Open(SIM_ANY, &dwResult)) { char chMsg[128], chTimeMsg[64]; unsigned int Heading[32]; BOOL fTimeOk = TRUE; static char chOurKey[] = "123456789ABC"; if (FSUIPC_Write(0x8001, 12, chOurKey, &dwResult)) FSUIPC_Process(&dwResult); if (!FSUIPC_Read(0x580, 4, Heading, &dwResult)|| !FSUIPC_Process(&dwResult)) // Process the request(s) fTimeOk = FALSE; if (fTimeOk) printf("HEADING = %d\n\n",Heading); else printf("Request for time failed: %s\n\n", pszErrors[dwResult]); } else printf ("PTEPS: Falha ao abrir link para FSUIPC\n\n\n", 0) ; FSUIPC_Close(); // Closing when it wasn't open is okay, so this is safe here return 0 }
×
×
  • 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.