Jump to content
The simFlight Network Forums

Single Rotary Encoder Freq toggle issue


Recommended Posts

Good Morning all.

Here is what I want to do.

I have a single rotary encoder with button.

I want to change the whole digits by turning the encoder.

I want to change the fracs digits by pushing the encoder button whilst turning.

I have gone through the advanced users guide and come up with the following code:

[JoyNames]

AutoAssignLetters=No

0=BU0836X Interface

0.GUID={FCC59820-25C1-11E2-8001-444553540000}

[buttons]

Buttonrepeat=20,10

1=P0,0,C65641,0

2=P0,1,C65640,0

3=CP(+0,8)0,0,C65643,0

4=CP(+0,8)0,1,C65642,0

5=P0,2,C65644,0

6=P0,3,C65645,0

7=P0,5,C65647,0

8=P0,4,C65646,0

9=P0,6,C66452,0

When implemented turning the encoder with button off works OK in changing the whole digits;

Pressing the button in whilst turning changes the Fracs digits, but the whole digits inc/dec as well.

I feel that somehow I need to implement the IgnoreThese commands, but can't work out how.

Any thought Pete and Friends.

Thanks in advance,

Rob.

Link to comment
Share on other sites

You posted what is obviously a Support question and not in any way a "contribution" into the User Contributions subforum, where it won't get answered. I've moved it here for you. Please always use the Support Forum for Support.

Here is what I want to do.

I have a single rotary encoder with button.

I want to change the whole digits by turning the encoder.

I want to change the fracs digits by pushing the encoder button whilst turning.

I have gone through the advanced users guide and come up with the following code:

...

1=P0,0,C65641,0

2=P0,1,C65640,0

3=CP(+0,8)0,0,C65643,0

4=CP(+0,8)0,1,C65642,0

When implemented turning the encoder with button off works OK in changing the whole digits;

Pressing the button in whilst turning changes the Fracs digits, but the whole digits inc/dec as well.

I feel that somehow I need to implement the IgnoreThese commands, but can't work out how.

Well, these two lines:

1=P0,0,C65641,0

2=P0,1,C65640,0

are unconditional -- you forgot to put any condition on them, so they will always activate. Don't you see? If you want them not to activate when button 0,8 is pressed you have to have the condition that it is not pressed, thus:

1=CP(-0,8)0,0,C65641,0

2=CP(-0,8)0,1,C65640,0

Didn't you see the inverse condition at all in your studies?

Regards

Pete

Link to comment
Share on other sites

Firstly, Sorry that I put it in the wrong area. I was actually in that area hoping to find a solution to this with someone having the same issue in the past, with a posted solution, and not have to make any post at all.

As far as the answer you provided, now that you posted it, it is clear and does make sense. I just didn't see the wood for the trees, even after reading the documentation. I just couldn't see it as it wasn't in the context that I was using it.

Many thanks.

Rob.

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.