Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration settings for translation/rotation disable, and dominant axis mode #34

Open
albfan opened this issue Feb 25, 2023 · 2 comments

Comments

@albfan
Copy link
Contributor

albfan commented Feb 25, 2023

Disable rotation/translation and dominant can only be enabled using a button action. That make the button unavailable for other actions.

In windows implementation, this settings can be setup permanently (see checkboxes at upper left):

spacenav-config

Combination acts positive, so pan/zoom and rotation are always enabled, we use disable rotation/translation.

Is it possible to add this config? I can work on PR

@jtsiomb
Copy link
Contributor

jtsiomb commented Feb 25, 2023

Certainly, but it will require changes across all parts of the spacenav project.

  • The new options would have to be added first of all as new REQ_SCFG_*/REQ_GCFG_* requests in proto.h (which needs to be synced across both spacenavd and libspnav), and handled in proto_unix.c.
  • Saving and loading of the new options should be implemented in cfgfile.c.
  • New spnav_cfg_* API entry points will have to be added to libspnav for the new configuration settings. This needs some thought. Maybe a generalized spnav_cfg_enable/spnav_cfg_disable/spnav_cfg_isenabled could handle all boolean options without having to add multiple entry points.
  • Modify the UI, and use the new libspnav functions to implement the functionality.

The only major concern about all that, is that spnavcfg with the new options will require libspnav with the new entry points. It was one thing to say "spnavcfg 1.0 needs libspnav 1.0" once, but if we do that for every version it becomes tedious. One way out is to dynamically load libspnav, and check if the new entry point is available before using it. Another way is to disable the new options at build time if the installed libspnav is too old.

Don't let this hold you back for now if you wish to work on this though. I can always come back and refactor things before the next release.

@albfan
Copy link
Contributor Author

albfan commented Feb 26, 2023

Thanks for details, All points make sense, so will try to work on them and see if can cover all them.

@jtsiomb jtsiomb changed the title Permanent settings Configuration settings for translation/rotation disable, and dominant axis mode Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants