Jump to content
The simFlight Network Forums

Encoders as pushs buttons don't work but event is detected before binding


Adri1
 Share

Recommended Posts

Hello !

I'm facing to a strange issue with FSUIPC7 that i don't really understand.

Well, i have bought FSUIPC7 for MFS2020 a few weeks ago, in order to bind my own button box to FS2020. All work fine (or almost) except 4 of my 5 encoders... . 

So here is the point:

I would like to bind my encoders to AP x var inc / dec (x = alt/hdg/vs etc). Each direction event of encoders is see like a push button. For example, for my first encoder, if I turn it in CW, my software send button 52 = 1,0,1,0 etc.. and if I turn it in CCW it send button 51 = 1,0,1,0 etc... . All of encoders works like that. 

On FSUIPC side, all of my encoders events are well logged in the FSUIPC log interface. But when after binding to a AP_x_Var_dec/incr, 4 of my encoders event are not visible anymore in the log interface and nothing move into the cockpit. Only the 5th encoder event is well logged and is able to set the AP target value... .

Moreover, if for exemple, my working encoder is binded on AP_alt_var_dec / incr and then I swap this variable to bind it on a not working encoders it doesn't work too. 

So we can conclude that it come from my software, but if i run my own debug interface i cannot see any issue, and FSUIPC7 see my encoders events before binding them, so i cannot really believed that it come from my software. Morover, if I bind them directly into MFS2020, all work !

I dont really understand.

Another stuff is that all of my swichs/push button/encoder ID are see by FSUIPC with the button ID from my SW + offset of 100.

For example, my software send button 42 = 1 then FSUIPC see button 142 = 1, maybe it's normal, i dont know.

Thanks a lot for your support !!

BR

Adrien

 

 

Link to comment
Share on other sites

11 hours ago, Adri1 said:

Another stuff is that all of my swichs/push button/encoder ID are see by FSUIPC with the button ID from my SW + offset of 100.

For example, my software send button 42 = 1 then FSUIPC see button 142 = 1, maybe it's normal, i dont know.

This is normal. and is for historic reasons. FSUIPC only used to recognise up to 32 buttons (0-31) and a POV switch (buttons 32-39). Buttons 40 onwards are offset by 100, so button 50 would be 140, etc.

11 hours ago, Adri1 said:

if I turn it in CW, my software send button 52 = 1,0,1,0 etc.. and if I turn it in CCW it send button 51 = 1,0,1,0 etc... . All of encoders works like that.

What is CW/CCW? If by 1 you mean a press and 0 a release, then that is usual for rotary buttons.

11 hours ago, Adri1 said:

On FSUIPC side, all of my encoders events are well logged in the FSUIPC log interface. But when after binding to a AP_x_Var_dec/incr, 4 of my encoders event are not visible anymore in the log interface and nothing move into the cockpit. Only the 5th encoder event is well logged and is able to set the AP target value... .

Moreover, if for exemple, my working encoder is binded on AP_alt_var_dec / incr and then I swap this variable to bind it on a not working encoders it doesn't work too. 

Could you show me your FSUIPC7.ini file, and an FSUIPC7.log file showing your issue (i.e. with button and event logging enabled, first turn the encoder that works in both directions, then one that doesn't). Show me the full log - do not start a new log file. You can zip it if its too large to attach as-is.

John

Link to comment
Share on other sites

Btw, what aircraft are you using? It could be that the aircraft is not using the standard controls. To work out what to use, activate the required function in the aircraft IO and see what is logged. Many aircraft in MSFS, especially more complex aircraft, use lvars, hvars or complex calculator code. You could try searching for a MobiFlight preset that activates the required function in the MobiFlight HubHop preset list. If one is available, you can try assigning to that (MF presets were added in v7.2.16, the latest version).

John

Link to comment
Share on other sites

Hello John,

Thanks a lot for your support !

12 hours ago, John Dowson said:

This is normal. and is for historic reasons. FSUIPC only used to recognise up to 32 buttons (0-31) and a POV switch (buttons 32-39). Buttons 40 onwards are offset by 100, so button 50 would be 140, etc.

What is CW/CCW? If by 1 you mean a press and 0 a release, then that is usual for rotary buttons.

Could you show me your FSUIPC7.ini file, and an FSUIPC7.log file showing your issue (i.e. with button and event logging enabled, first turn the encoder that works in both directions, then one that doesn't). Show me the full log - do not start a new log file. You can zip it if its too large to attach as-is.

John

ok, understood about +100 offset. CW /CCW : I just mean clockwise and counterclockwise to indicate my rotatory direction, but anyway it's not important.

Yes I mean by 1 press and 0 release. find in attached my .init.

I cannot send you any picture or full log, they are too big.

Logs.txt is not the full log, I have skipped some of them to reduce file size and I had some comments inside. hope it can help...

Thanks !

Adrien

 

FSUIPC7.ini

logs.txt

Edited by Adri1
Link to comment
Share on other sites

10 hours ago, John Dowson said:

Btw, what aircraft are you using? It could be that the aircraft is not using the standard controls. To work out what to use, activate the required function in the aircraft IO and see what is logged. Many aircraft in MSFS, especially more complex aircraft, use lvars, hvars or complex calculator code. You could try searching for a MobiFlight preset that activates the required function in the MobiFlight HubHop preset list. If one is available, you can try assigning to that (MF presets were added in v7.2.16, the latest version).

John

i'm using an A320. but it's strange because with the working encoders I can set all variable of AP... so it doesn't come from a not standard control

Link to comment
Share on other sites

15 hours ago, Adri1 said:

I cannot send you any picture or full log, they are too big.

You can zip your log before attaching.

The log you attached shows nothing except that your assignment #82 on button 157 (57) is working.
Are you saying that nothing at all is logged when you activate button 164 (for example), even though you can see the assignment (to AP_SPD_VAR_INC) to this button in the button assignment panel? If this is the case, I cannot see how it can be recognised when the assignment panel is open but not when closed....

Please zip and attach a full log.

Link to comment
Share on other sites

Hello John,

Sorry, for my late reply but I encountered another issue since the last MFS2020 update... now I cannot open FSUIPC GUI buttons menu assignment (and I think, the others menus too) when Flight simulator is running. If I click on FSUIPC icon to show GUI, icon disappears and nothing happen.

So I cannot do anything for now about logs. I think you will update FSUIPC in few days so i wait for your release to continue my buttonbox investigation 🙂

Thanks !

 

BR

Adrien

 

Link to comment
Share on other sites

6 hours ago, Adri1 said:

I think you will update FSUIPC in few days so i wait for your release to continue my buttonbox investigation 🙂

The current FSUIPC release should work fine with the latest MSFS release.

6 hours ago, Adri1 said:

If I click on FSUIPC icon to show GUI, icon disappears and nothing happen.

Thus sounds like the UI is being positioned off-screen. Do you not see the FSUIPC7 icon in your task bar? If it is a positioning issue, delete the Window parameter for your FSUIPC7.ini [General] section - this will reset to the default window position and size.

6 hours ago, Adri1 said:

now I cannot open FSUIPC GUI buttons menu assignment (and I think, the others menus too) when Flight simulator is running.

Does this mean that you can see the GUI when MSFS is not running? There really should be no difference in the FSUIPC7 main window position and menus displayed whether MSFS is running or not...

6 hours ago, Hilike1995 said:

I have been trying to get this working for days now. I am using a encoder that has a push button switch attached to it.

Get what working? You don't supply much information.... Please give me a full description of your problem,  and attach the relevant files, which would be your FSUIPC7.ini and your FSUIPC7.log with the relevant logging activated (Buttons + Keys and Events) showing your issue.

John

Link to comment
Share on other sites

Hi John,

You have seen right, after "window" parameters removed, GUI work again !

So i have success to save all logs ! (find in enclosed)

what i have been done is :

1) open MFS2020

2) choose an airport for departure, and then start simulation with A320

3) after simulation loaded and having take place in cockpit, I have open FSUIPC GUI and go into button and switches menu

4) first, I have rotate the working encoder to assign it to "AP_MACH_VAR_DEC", click on ok to save, and repeat the process for "AP_MACH_VAR_INC"

5) in second time I have rotate the not working encoder to assign it to "AP_ALT_VAR_DEC" and "AP_ALT_VAR_INC" with the same process than the working encoder

6) Nothing about the not working encoder seems to work after have tried the assignments

7) I came back to main menu

Thanks a lot for your support !

Adrien

 

Logs.zip

Link to comment
Share on other sites

Can you please attach your FSUIPC7.ini so that I can see your assignments. Your log shows the AP_VS_VAR_INC and AP_VS_VAR_DEC being sent on buttons 82 and 80. There are no AP_MACH_VAR_DEC or AP_MACH_VAR_INC controls sent from your "working" encoder.

Link to comment
Share on other sites

Hi john,

Ok i will attach .init this weekend,

And yes my bad !! It is VS not MACH for working encoder, so it's normal. But as you can see ALT doesn't seem to be assigned... here is the point.

Ok for button ID 82 and 80, it is strange because my encoders send for example IDs 75 and 76 or 77 and 78 but IDs is always "n" for one direction and "n+1" for the other direction... 

BR

Adrien

 

Link to comment
Share on other sites

Sorry, it is buttons 157 and 156, for assignments with indexes 82 and 80. I understand your issue but do not understand why the other encoders aren't being logged - at least the button numbers should be logged when triggered.

3 hours ago, Adri1 said:

it is strange because my encoders send for example IDs 75 and 76 or 77 and 78 but IDs is always "n" for one direction and "n+1" for the other direction... 

It is normal for the encoder button numbers to be n and n+1. The assignment indexes don't matter really - they will only be logged if there is an assignment to the button.
I'm not sure why nothing is being logged for some of your encoders - i will take a look at the code to see if there is any further logging I can activate or add.

John

Link to comment
Share on other sites

Hi john,

Thanks a lots !, yes, I should see at least when they are trigged. In fact FSUIPC seems doesnt save the assignement.

I have look again my own code and my debug log, I see anything different between the working encoder and not working encoder except the ID of course.

And what about the maximal ID number that FSUIPC could take in account ?

Because i just see something strange, if I assigne a push button (a real push button) with a lower ID than my not working (and working) encoders to these variables, it work ! 

Maybe there is an issue with max ID numbers.

Thanks a lot for your support !

BR

Adrien

Link to comment
Share on other sites

1 hour ago, Adri1 said:

And what about the maximal ID number that FSUIPC could take in account ?

Because i just see something strange, if I assigne a push button (a real push button) with a lower ID then my not working (and working) encoders to these variables, it work ! 

Maybe there is an issue with max ID numbers.

FSUIPC should now recognise up to 128 buttons. And the encoder buttons are recognised in the assignments, so I don't think that is the issue. What are the button numbers (not assignment indexes) for the unrecognised encoder buttons (i.e. the numbers you see in the assignment panel)? Your FSUIPC7.ini would tell me - still waiting to see that...

You could try an assignment to your button numbers 63 and 64 to check that there is not a limit somewhere that makes it fail after button number 63 (which will be your 64th button). Unfortunately I don't have any devices with so many buttons so difficult for me to test. i will look into this in more detail, probably at the weekend - I need to finalise and release the next FSUIPC version (v7.2.17 or possibly v7.3.0) in the next day or two, and I will look into this in more detail once that is released.

John

Later: you could try activating all of your buttons with numbers > 57 to se which ones are logged (open  the logging console and see if recognised when pressed, although you will only get the joystick values logged if not assigned. I'll test with a virtual device at the weekend.

Edited by John Dowson
Later added
Link to comment
Share on other sites

Hi John,

please, find in enclose my .init

so regarding index of 5 encoders :

Working encoder :

56 & 57

Not working encoder

64 & 65

66 & 67

68 & 69

70 & 71

so now, I perform the following tests (PB =push button, ENC : encoder)

Enc: 56 & 57 -> AP VS inc/dc => ok

PB: 58 -> barometric Std Pressure => ok

PB: 59 -> Speed slot index => ok

PB: 60 -> Heading slot index set => ok

PB:61 ->Altitude slot index set => ok

PB:62 ->VS slot index set => ok

ID 63 is free (nothing is wired)

Enc : 64 & 65 => not assigned (because no barometric inc/dec variable is available)

Enc : 66 & 67 => AP Speed inc/dc => NOK

Enc : 68 & 69 => Heading Bug inc/dec => NOK

Enc : 70 & 71 => AP Alt inc/dc => NOK

so this is my main settings.

if I try to assign Enc : 64 & 65 to ADF 1 inc/dec to test => NOK

 

so it seems that the issue appears for ID > 62 (maybe 63 I don't know). I can connect a push button to test ID 63 (next week) if it can help you.

 

Thanks !

BR

Adrien

 

 

 

 

FSUIPC7.ini

Link to comment
Share on other sites

1 hour ago, Byronb said:

Just a thought, Leo Bodnar encoders have to be programmed to work properly.

As I have commented, the issue is confirmed - assignments to button numbers 64-95 are not being triggered, both in FSUIPC6 and FSUIPC7.

John

Link to comment
Share on other sites

Hi John,

good news !! it works perfectly with this version !!

let me know if you need again some informations .init .log etc ...

 

thanks a lot for your great support !!

Adrien

 

 

Link to comment
Share on other sites

8 hours ago, Adri1 said:

good news !! it works perfectly with this version !!

let me know if you need again some informations .init .log etc ...

Great! No more information needed, thanks. I will release this version later today.

Cheers,

John

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.