bpcw001 Posted February 9, 2013 Report Share Posted February 9, 2013 Hi, I'd like to have a joystick axis reassigned on button press, e. g. if a joystick axis is assigned to the aileron axis, I want to press a button to reassign the same axis to act as steering tiller axis, and pressing the button again (or a different button) should switch back to the aileron axis assignment. Is such thing possible? If yes, I'd appreciate any input on how to actually solve this. Thank you very much Dave Link to comment Share on other sites More sharing options...
Pete Dowson Posted February 18, 2013 Report Share Posted February 18, 2013 I'd like to have a joystick axis reassigned on button press, e. g. if a joystick axis is assigned to the aileron axis, I want to press a button to reassign the same axis to act as steering tiller axis, and pressing the button again (or a different button) should switch back to the aileron axis assignment. Is such thing possible? Yes. You'd have to put that logic into a Lua plug-in. The axis would be assigned to that Lua plug-in, which would automatically receive the raw uncalibrated axis input as variable "ipcPARAM". In the plug-in you would test a user offset to see how to forward the axis using ipc.control. The best control values to use are the "direct to FSUIPC calibration" ones, lists at the end of the added controls list in the FSUIPC advanced user's guide. The user offset (eg 66C0) would be updated by your button using offset byte cyclic inc, so the value there cycles between however many values you want, or if only the two, use offset byte togglebits with a value of 255 so it alternates between 0 and 255, Regards Pete Link to comment Share on other sites More sharing options...
bpcw001 Posted February 23, 2013 Author Report Share Posted February 23, 2013 Yes. You'd have to put that logic into a Lua plug-in. The axis would be assigned to that Lua plug-in, which would automatically receive the raw uncalibrated axis input as variable "ipcPARAM". In the plug-in you would test a user offset to see how to forward the axis using ipc.control. The best control values to use are the "direct to FSUIPC calibration" ones, lists at the end of the added controls list in the FSUIPC advanced user's guide. The user offset (eg 66C0) would be updated by your button using offset byte cyclic inc, so the value there cycles between however many values you want, or if only the two, use offset byte togglebits with a value of 255 so it alternates between 0 and 255, Regards Pete Thanks. You really work through your posts backlog and provide help and answers. I do appreciate that. Link to comment Share on other sites More sharing options...
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