Elephant42 / FS_Tool

18 stars 5 forks source link

SimVar not working correctly #3

Closed karlo922 closed 3 years ago

karlo922 commented 3 years ago

Hi,

as already started in FS-Forum, it maybe helps when I post my XML JoystickMappings.zip

The whole buttons will stop working with this. But if you delete some lines, it will work again... But it seems not to be relevant which you delete. EDIT: It somehow is linked to the use of the SimVars GENERAL ENG STARTER:1, but I do not really get it.

Elephant42 commented 3 years ago

You need to get rid of all the white spaces in your SimEvents as the parser is very rudimentary. e.g. SimEvent="LIGHT_POTENTIOMETER_DEC:3, LIGHT_POTENTIOMETER_24_DEC:1;" should be SimEvent="LIGHT_POTENTIOMETER_DEC:3,LIGHT_POTENTIOMETER_24_DEC:1;" Try that and let me know how it goes.

karlo922 commented 3 years ago

you put a ; at the end of the line you showed -> do I need it? I don't have it

Elephant42 commented 3 years ago

I didn't put it there it's cut and pasted from your file - and no it should not be there

karlo922 commented 3 years ago

JoystickMappings200116_1125.zip

I've done it smaller now and deleted the whitespaces - this also does not work - which means that no button (Even those which do not use SimVars) do not work. BUT: If I enable for example A/THR per mouse, it will get disabled by the tool. So it still is doing something.

As soon as I delete the 4xSimVar="GENERAL ENG STARTER:1" ActiveState="True" in line 7-10 everything works again.

UPDATE: It is not linked to these specific SimVars. I now also can reproduce the fault with this: JoystickMappings200116_1536.zip

And it gets working again, if I reduce fom 5 SimVars used to 3 SimVars used -> And when using Debug mode, I can see that with5 SimVars, I even do not get the "Joystick event received from" anymore. As soon as I delete some SimVars, I again get it. So the Joystick itself is not anymore wokring. But it is linked to the use of SimVars. This here works: JoystickMappings200116_1540_working.zip

And the only change is the deletion of the last 2 SimVars.

Elephant42 commented 3 years ago

Ok the good news is that I can reproduce the bug on my logitech joystick using the two smaller profiles you supplied. We'll now see if I'm able to track down the cause - stay tuned, it might take me a while...

Elephant42 commented 3 years ago

I think it's fixed. You actually uncovered two issues with the SimVar handling code. One caused un-necessary code to run and consume cycles and resources but did no actual harm, the other is what caused the bug you found - it was old experimental code that I put in when trying to get the issues with the Alpha yoke sorted - I forgot to remove it when it proved to be a dead end. Hopefully all is sorted now - please sync your working copy, recompile, test and let me know the results.

karlo922 commented 3 years ago

Hi! Everything seems to work now. Thank you very very much! This tool is awesome :)

karlo922 commented 3 years ago

Fixed with v0.6.2.1