yomar Posted November 13, 2021 Report Posted November 13, 2021 Hello. Just bought fsuipc7. I'm using it to assign actions for my DIY button box/flight panel. My flight panel has momentary buttons, switches and 5 rotary encoders with buttons. I used teensy 3.2. The switches and buttons work, as I've tested them both using the joy.cpl app on Windows as well as in MSFS itself using FSUIPC to assign the actions. As for the rotary encoders, they also work when I tested them using the serial monitor on Arduino IDE. The buttons also work. However, I can't seem to get the rotary encoders to function inside MSFS2020 itself. Even on FSUIPC7, the software is unable to detect neither clockwise nor anti-clockwise movements from any of the rotary encoders. Only the buttons on the encoders are detected. I wanted to use them to adjust the heading bug, altitude select, vertical speed etc. Is there anything I am missing? I'm not good with programming/coding. I just copied the sketch online, which actually worked. Any help would be great and apologies if this is such a noob question or if already asked.
yomar Posted November 14, 2021 Author Report Posted November 14, 2021 I forgot to add my code. I hope someone could point me to the right direction. I know I'm missing something here. 😄 SBDFlightPanel.ino
John Dowson Posted November 14, 2021 Report Posted November 14, 2021 19 hours ago, yomar said: My flight panel has momentary buttons, switches and 5 rotary encoders with buttons. I used teensy 3.2. ... I forgot to add my code. Sorry, but I no nothing about teensy. 19 hours ago, yomar said: As for the rotary encoders, they also work when I tested them using the serial monitor on Arduino IDE. The buttons also work. However, I can't seem to get the rotary encoders to function inside MSFS2020 itself. Even on FSUIPC7, the software is unable to detect neither clockwise nor anti-clockwise movements from any of the rotary encoders. Only the buttons on the encoders are detected. I wanted to use them to adjust the heading bug, altitude select, vertical speed etc. Not sure I understand... You say 'only the buttons on the encoders are detected', so why don't you assign to those? Rotary encoders come in various types. Some use potentiometers in which case they are assigned to an axis, but many use either one or two buttons in each direction. For these types of rotaries, you assign the buttons to the corresponding inc/dec control. If there are two buttons in each direction, one will be for fast inc/dec, the other for slow inc/dec. If there is only one button in each direction, you can use a lua script to emulate fast/slow turning - such a script is provided in the lua examples: Quote rotaries.lua This uses the HID features of the com library to implement fast and slow turning button results for rotary encoders which otherwise only indicate one button press/release for each direction If its a two-phase type rotary, 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, then please see the Advanced User guide (P21). John
yomar Posted November 15, 2021 Author Report Posted November 15, 2021 Thanks so much for the reply, Jon. Im really embarassed. You were right, I just had to assign joystick actions to the knob turns. In the code that i did, the only actions i did was to print the direction of the turn (cw or ccw) and the present value. Thats why it worked on the arduino serial monitor but did nothing anywhere else. So i added joystick.button commands to each turn. Everything is good now. Thanks again.
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