Hi everybody,
I've started today in take offsets from FSUIPC and send them to Delphi. For study, I am using the Delphi example of the SDK and trying to implement another offsets.
During tests with the IAS (offset 02BC), I am not being able to return the correct value of this offset. Comparing with FsInterrogator, my value is very diferent to the value in Fsint.
I am sending the routine that calculates the Airspeed in my program. If somebody can tell me what am I doing wrong, i'll be aprreciate. I believe I am not using some other convertion or taking the value in a wrong way.
Here is the code:
===========================================
procedure TFrmTPrincipal.MostraVelocidade;
var
dwResult : DWORD;
Velocidade: Byte;
Calculo: Double;
begin
if FSUIPC_Read($02BC, 4, @Velocidade, dwResult) then
begin
if FSUIPC_Process(dwResult) then
begin
Calculo := Round(Velocidade / 128);
stVelocidade.Caption := FloatToStr(Calculo);
end;
end;
end;
============================================================
Thanks very much!