Hi Guys,
Im struggling with Sioc,everytime i seem to try things,i take for ever and sometimes i completely bomb out.Here is what im trying to achieve.
Want to display my remaining fuel in gallons on a lcd display.However Fsuipc returns the value as a percentage.There is also an offset that holds the max capacity of the tank.So with my maths i would take the
percentage multiply it by tank capacity and divide by 100.
So i set to write some code as follows(i really dont fully inderstand sioc);
// **** Fuel Left *****
var 6030 name fuell Link FSUIPC_IN,offset $0b7c Length 4 // % remaining
{
L0 = v6030 / 0.000011920928955078125
v6032 = L0 / 100
}
var 6034 name fuelmax Link FSUIPC_IN,OFFSET $0b80 Length 4 // Tank Capacity
{
v6033 = v6034
}
Var 6037 name fcalc Value 0
{
CALL &Outfuel
}
Var 6039 name Outfuel Link Subrutine
{
Fuellcd = (here is where im trying to do the maths)
}
Var 6001 name Fuellcd // Output to lcd
Now when i try to say multiply the tank value by the percentage i cant seem to find out how to do this portion.
I dont even know if what i have written above is correct.
Any help would be much appreciated.
Thanks
Les :(