Jump to content
The simFlight Network Forums

SimCheck A300B4-200


Recommended Posts

Here is the code i was refering to (this works but whit out("%01.2f", Mach) as i tryeid your other option to test if i did it right) but miss the 0.00 as now it is shown whit out the .

Mach = math.floor( (ipc.readUD(0X07E8) / 655.36) + 0.5)

if (Mach ~= prevMach) then

stringMach = string.format("%03d", Mach)

gfd.setDisplay(GFMCPPRO,0,1,stringMach)

prevMach = Mach

end

That gives you Mach speed x 100, with no decimal point. eg. 082 for mach 0.82

It have some looks at the explanation you gave the other day and tryeid to edit the part f but i dont know to what i understand that that 2 is = 2 signs but is there any difference whit this when i use it whit offsets for the mach any changes there should be made in order to work: ("%01.2f", Mach)?

For that you need to divide by 100 of course:

stringMach = string.format("%01.2f", Mach/100)

That will give 0.82 for mach 0.82.

Pete

Link to comment
Share on other sites

pete i dont know i tryeid whit that today whit out luck but i think what i missed was 655.36 as i used it as in the manual 65536. but found 655.36 in the ex of vrinsight mach. mabee thats why i could get it work, i just feel so stupid tryeid different of your ex and whit out luck and in the end i was close earlyer today.

Link to comment
Share on other sites

pete i dont know i tryeid whit that today whit out luck but i think what i missed was 655.36 as i used it as in the manual 65536

The value from the offset is mach x 65536. But to get 3 digits you have to multiply by 100 (0.82 to 82). If you divide by 65536 and multiply by 100 you get 655.36 -- please use a little more thinking!

Pete

Link to comment
Share on other sites

ok i used your EX. from another post to identify whitch 1 there is active like this: but i found that L:IAS Mach Pressed is used, the log shows L:IAS Mach Pressed=1 then L:IAS Mach Pressed=0

so it seems i cant use that as for some reason it just changes to 1 then back to 0. so i think a offset would be req to work. then i had some looks on other forums about the sel button and seems hard to define. then i had a look in the fusipc.log for what it could be it use of the default names but nothing in the log.. then i look at the offsets from the sdk dokument but no sel button or something like that. then i think what can it then bee i should look for? as the lvar here is to no use.

DES = ipc.readLvar("L:IAS Mach Pressed")

if (DES ~= prevDES) then

prevDES = DES

prevspeed = -1

prevMach = -1

end

if DES == 1 then

Mach = math.floor( (ipc.readUD(0X07E8) / 655.36) + 0.5)

if (Mach ~= prevMach) then

stringMach = string.format("%01.2f", Mach/100)

gfd.setDisplay(GFMCPPRO,0,1,stringMach)

prevMach = Mach

end

else

SPD = ipc.readUD(0X07E2)

if (SPD ~= prevSPD) then

stringSPD = string.format("%03d", SPD)

gfd.setDisplay(GFMCPPRO,0,1,stringSPD)

prevSPD = SPD

end

end

Link to comment
Share on other sites

ok i used your EX. from another post to identify whitch 1 there is active like this: but i found that L:IAS Mach Pressed is used, the log shows L:IAS Mach Pressed=1 then L:IAS Mach Pressed=0

so it seems i cant use that as for some reason it just changes to 1 then back to 0

Obviously that Lvar simply means the button is pressed.

so i think a offset would be req to work

No, there is no way. Even with FS you can only tell if Mach or IAS is being used if FS autothrottle speed control is engaged. You cannot tell what the display shows -- that is local to the display and controlled by the C/O button only, not a switch.

With aytothrottle engaged, use Mach hold or Speed hold variables to see which to display. Otherwise all you can do is swap them then you see the button pressed.

Pete

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.