McBlack Posted April 2, 2023 Report Posted April 2, 2023 Hello there LeoBodnar.com offers dual concentric rotary encoders, but they send 2 impulses per detent. Is it possible in FSUIPC7 use some kind of mapping to send only 1 value change? I read complete manual but was unable to find solution. Thank you Petr
John Dowson Posted April 3, 2023 Report Posted April 3, 2023 (edited) 10 hours ago, McBlack said: LeoBodnar.com offers dual concentric rotary encoders, but they send 2 impulses per detent. Are they not just a press and a release? Or are these 2 pulses phase-shifted? If so, see the Advanced User guide pm page 22: Quote Third, you can now program those two-phase type rotary switches, the ones where turning the spindle one way gives pulses on two lines phase shifted one way, and turning the spindle the other way gives the opposite phase relationship. Say the inputs from the rotary are on Joystick 1, Buttons 1 and 2. When B1 is ON and B2 goes from off to on, then the spindle has turned one way. When B1 in ON and B2 goes from on to off, the spindle has turned the other. That is the simplest example: 1=CP(+1,1)1,2, ... turn direction 1 action 2=CU(+1,1)1,2, ...turn direction 2 action You can also have double speed action, operating on every off to on and on to off change of B2. Just add two more conditions: 3=CP(–1,1)1,2, ... 4=CU(–1,1)1,2, ... turn direction 2 action (B2 goes off to on when B1 is off)turn direction 1 action (B2 goes on to off when B1 is off). Since the whole thing is completely symmetric (there is no reason why B1 should control B2, it could also be the other way around), you can actually program it to act on ALL edges of both buttons, by adding another 4 conditions: 5=CP(+1,2)1,1, ... turn direction 2 action (B1 goes off to on when B2 is on) 6=CU(+1,2)1,1, ....turn direction 1 action (B1 goes on to off when B2 is on) 7=CP(–1,2)1,1, ...turn direction 1 action (B1 goes off to on when B2 is off) 8=CU(–1,2)1,1, ..turn direction 2 action (B1 goes on to off when B2 is off) So, you can effectively choose how many pulses you will get for a given turning rate. As you can see, you can get rates of 1x, 2x or 4x—even 3x if you do one part for only half the changes! Note that for reliability at higher speeds you may need to reduce the PollInterval. I suggest you read that chapter anyway, If they are really sending two presses, maybe try adding a condition on the button flag, as this would be set on the first press and cleared on the second. And if all else fails. you can always use lua to act on every other button press. Edited April 3, 2023 by John Dowson format corrected
McBlack Posted April 3, 2023 Author Report Posted April 3, 2023 I'm not really sure how they work, the leobodnar site says "2 pulses per detent - 1:2 mode in our encoder config software" I just wanted to know, if FSUIPC7 can handle that, so I can buy them, and from you reply, it seems that there are multiple ways how to do it. Thank you!
McBlack Posted April 17, 2023 Author Report Posted April 17, 2023 So if anyone else is interested, I figured it out. The rotary encoders are sending pulsed A,B if turned one way and B,A if turned other way, but If you use USB interface board from leobodnar like I do, you can download program from there and in that program you can configure type of encoders for each input and number of impulses per detent (no encoder, 1:1, 1:2, etd.), and then the game (or FCUIPC) receives only A input if turned one way and only B input, if turned other way, there is no need to do any advanced programing of FSUIPC.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now