English Rebel Posted May 16, 2013 Author Report Posted May 16, 2013 Pete Now from your last reply; The log would record EVERY single change in the switch, but there is NO change -- once you've pressed it it remains looking pressed until you've pressed another, different switch. It became clear that the problem was that I had not put an entry in InterfaceIT for the Up (Off) function of the switch so there was no change of state from the initial press. Heres what InterfaceIT can do when Updating FSUIPC for both Down (On) and Up (Off) switch actions Type options: Byte Float64 Longint Longword Shortint Smallint Unknown Word Operation options: Decrement Increment None Clearbit Setbit Setbit then reset Set value Set value then zero Toggle bit Unknown There are also boxes for entering the following: Value Maximum value Minimum value Sleep And of course the actual offset. I finaslly figured it out. I used the 3360 offset, Byte Set bit with a value of 1 for Nose Down Trim switch Down (On) and Clear bit with a value of 1. I then used the 3360 offset, Byte Set bit with a value of 2 for Nose Down Trim switch Down (On) and Clear bit with a value of 2. In FSUIPC Buttons + Switches the Nose Up and Nose Down switch presses were recognized and I used Elevator Trim Up with a Parameter of x01 and Elevator Trim Down with a Parameter of x02 with the Control to repeat while held box checked. Works like a charm. :razz: Thanks for your frustrated help. :???: Alan
Pete Dowson Posted May 16, 2013 Report Posted May 16, 2013 It became clear that the problem was that I had not put an entry in InterfaceIT for the Up (Off) function of the switch so there was no change of state from the initial press. Exactly as I hypothesised. Heres what InterfaceIT can do when Updating FSUIPC for both Down (On) and Up (Off) switch actions Okay. Good. You need to use "Setbit" for pressing a button/switch, and "Clearbit" for releasing it, both with the same value. In your picture you've used Set value for a byte, which will affect 8 buttons, not just the one you want to change! Values are 1 for button 0, 2 for button 1, 4 for button 2 ... 128 for button 7. Pete
English Rebel Posted May 16, 2013 Author Report Posted May 16, 2013 Pete That screen shot was before I reprogrammed it. I used Set bit for ON and Clear bit for OFF. Works great. Now I can go on and program the rudder. Thanks Alan
English Rebel Posted May 18, 2013 Author Report Posted May 18, 2013 Pete Not sure what's going on here, but if I use the values 0, 1, 2, 4, 8, 16, etc as you described above, only 0, 1, 2, and 4 work for me -- 8, 16, and above aren't recognized in Buttons + Switches. What does work is if I use 0, 1, 2, 3, 4, 5, 6, etc., and they are recognized in Buttons + Switches as Joy# 72, Btn# 0, 1, 2, 3, 4 etc. I'm happy that all my trim functions work but I'd like to know why the value progression is different. Alan
Pete Dowson Posted May 18, 2013 Report Posted May 18, 2013 Not sure what's going on here, but if I use the values 0, 1, 2, 4, 8, 16, etc as you described above, only 0, 1, 2, and 4 work for me -- 8, 16, and above aren't recognized in Buttons + Switches. What does work is if I use 0, 1, 2, 3, 4, 5, 6, etc., and they are recognized in Buttons + Switches as Joy# 72, Btn# 0, 1, 2, 3, 4 etc. Seems that the software you are using does the conversion of the data from bit numbers to values to be logically OR'd or ANDed. Perhaps you should actually refer to the documentation for that software when you want to use it? I can only tell you what the actual interface into FSUIPC needs to see. Bits are numbered 0 - 7 in each byte, the values are 2^0 to 2^7 (^ means "to the power of" so that 2^4 = 2 x 2 x 2 x 2 = 16). The advantage of using Values, as per the actual FSUIPC interface, is that more than one bit can be changed at a time. For instance, the offset containing the FSX light switches is a 16 bit word using 10 separate bits for lights, so they can be controlled individually or all at once, or in clusters, etc. Pete
English Rebel Posted May 18, 2013 Author Report Posted May 18, 2013 Okay thanks for that. I knew there had to be a simple explanation. Alan
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