Hi,
I am currently writing an instructor software for my student association's simulator.
(C langage, FSUIPC 3.8.1.0 registered, FSUIPC link opened and working, FS version: 9.1)
I'd like to make a replay control box.
The thing is that I cannot set a value in the replay flag (offset 0628).
I tryed several solution, but everytime I test the software, the simulator is paused.
the code is:
int SetReplayMode(Uint32 valeur)
{
DWORD dwResult;
FSUIPC_Write(0x0628, 4, &valeur, &dwResult);
FSUIPC_Process(&dwResult);
return 1;
}
int SetReplayTime(Uint32 valeur)
{
DWORD dwResult;
FSUIPC_Write(0x062C, 4, &valeur, &dwResult);
FSUIPC_Process(&dwResult);
return 1;
}
These functions are called in this order:
SetReplayTime(60);
SetReplayMode(1);
That is my first problem. The second is that I tried to get the COM and NAV frequencies. I read that I am supposed to get, for example 1825 if the frequency is 118.25.
I get:
COM1: 8853 (so 188.53 instead of 122.95) - offset 034E
COM2: 6544 (so 165.44 instead of 119.90) - offset 3118
NAV1: 4144 (so 141.44 instead of 110.30) - offset 0350
NAV2: 5760 (so 157.60 instead of 116.80) - offset 0352
the code is:
Uint16 GetCOM1() //034E
{
DWORD dwResult;
Uint16 valeur;
FSUIPC_Read(0x034E, 2, &valeur, &dwResult);
FSUIPC_Process(&dwResult);
return valeur;
}
(it is the same code for COM2, NAV1 and NAV2, with the corresponding offsets)
I hope you're able to help me!
Thanks anyway for FSUIPC, this is really the best FS add-on !
Stéphane - dPm
President of IPSAFlight association