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

Add simple input driver interface, support 3D Mouse devices #2130

Merged
merged 152 commits into from Oct 13, 2018

Conversation

7 participants
@t-paul
Member

t-paul commented Oct 15, 2017

See #1433. (this is refreshed/rebased version of #1807)

Driver backends (optional + compile time selectable):

  • HIDAPI driver, Windows and macOS
  • SpaceNav driver, Linux only
  • DBus driver, Linux only - prototype for a simple remote control protocol
  • Joystick driver, Linux only
  • QtGamepad driver, Platform independed, needs Qt5.9+

Also contains an initial version of a configuration GUI using low level Qt actions.

ToDo:

  • Add option to enable/disable specific drivers
  • Tag as experimental feature
  • Test on Linux
  • Test on MacOS
  • Test on Windows (QtGamepad + Xbox Controller)

Optional:

  • Wait for #2261? That would be awesome to have but I feel it's not needed to get things out to a larger audience for testing

Related/future developments:

  • add 'speed' adjustment for axis (currently zoom using up/down axis is slow compared to others)
  • add toggle version of actions for use with buttons, e.g. viewActionOrthogonal v's viewActionPerspective

@t-paul t-paul referenced this pull request Oct 15, 2017

Closed

Add simple input driver interface, support 3D Mouse devices #1807

0 of 2 tasks complete
@MichaelPFrey

This comment has been minimized.

Member

MichaelPFrey commented Oct 15, 2017

when I run qmake on the new branch, I get "WARNING: Failure to find: src/input/SixDoFDev.h"
The file is referenced in both Makefile and openscad.pro

@t-paul

This comment has been minimized.

Member

t-paul commented Oct 15, 2017

Yep, that does not exist anymore. Pushed the fix just now.

@t-paul t-paul added this to Optional in OpenSCAD Next Release Oct 7, 2018

@kintel kintel moved this from Move to a later release to Evaluating in OpenSCAD Next Release Oct 8, 2018

@kintel kintel moved this from Evaluating to TODO - Required in OpenSCAD Next Release Oct 8, 2018

@kintel kintel moved this from TODO - Required to In progress / getting close in OpenSCAD Next Release Oct 8, 2018

@kintel

kintel requested changes Oct 13, 2018 edited

I did a read-through and left a bunch of comments.
Some things may not be trivial to address right now (e.g. build system stuff) but we could open a new issue for such things.

Show resolved Hide resolved CMakeLists.txt
}
}
QAction * MainWindow::findAction(const QList<QAction *> &actions, const std::string &name)

This comment has been minimized.

@kintel

kintel Oct 13, 2018

Member

Why is this an instance member of MainWindow? A free function would be nicer I think.
Also, keep in mind you can use std::find_if() on QLists, e.g. smth. like this:

  auto iter = std::find_if(actions.begin(), actions.end(), [&name](const auto& action) {
    return !action->objectName().isEmpty() &&   action->objectName().toStdString() == name;
  });

..with provisions for that recursive search.

Show resolved Hide resolved src/Preferences.cc Outdated
Show resolved Hide resolved src/settings.cc
Show resolved Hide resolved src/input/InputEventMapper.cc Outdated
Show resolved Hide resolved src/MainWindow.h Outdated
Show resolved Hide resolved src/MainWindow.h Outdated
Show resolved Hide resolved src/input/DBusInputDriver.h Outdated
Show resolved Hide resolved src/input/InputDriverManager.h Outdated
Show resolved Hide resolved src/input/InputDriverManager.h Outdated
@kintel

Suggested two easy for loop improvements

Show resolved Hide resolved src/input/ButtonConfigWidget.cc Outdated
Show resolved Hide resolved src/input/DBusInputDriver.cc Outdated

t-paul and others added some commits Oct 13, 2018

@kintel

kintel approved these changes Oct 13, 2018

@t-paul t-paul merged commit 022f50e into master Oct 13, 2018

2 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@t-paul t-paul deleted the inputdriver5 branch Oct 13, 2018

@t-paul

This comment has been minimized.

Member

t-paul commented Oct 13, 2018

Yay, that was a big one. Thanks @MichaelPFrey for all the work to get this in. First commit is from 2016-09-28.

@t-paul t-paul moved this from In progress / getting close to Done in OpenSCAD Next Release Oct 13, 2018

@MichaelPFrey

This comment has been minimized.

Member

MichaelPFrey commented Oct 14, 2018

@t-paul thank you for the foundation of this drivers and your mentorship. I learned a lot while working on this feature branch and a the same time working on the customizer. It was great to go back and forward and to apply the experiences of one feature to the other. And now finally, both features are happily united in as experimental features in the master branch. (and now offcourse we have to get it stable)

@MichaelAtOz

This comment has been minimized.

Member

MichaelAtOz commented Oct 23, 2018

Is this in the 2018.10.13 Windows snapshot?
I'll have to dust off my SpaceMouse...really
imag2429

@t-paul

This comment has been minimized.

Member

t-paul commented Oct 23, 2018

Aww, that poor thing needs saving. Yes, it's included in the latest snapshot with HIDAPI and QGamepad (which might only work with xbox gamepads for now) available if enabled via preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment