diff --git a/data/assets/examples/joystickProperty.asset b/data/assets/examples/joystickProperty.asset index bcd71b14e9..27eeb6233a 100644 --- a/data/assets/examples/joystickProperty.asset +++ b/data/assets/examples/joystickProperty.asset @@ -18,7 +18,8 @@ -- The axis values can either go back to 0 when the joystick is released or it can -- stay at the value it was before the joystick was released. -- The latter is called a sticky axis, when the values don't go back to 0. --- Seventh parameter is the sensitivity for the axis +-- Seventh parameter can be used to reverse the camera movement for the axis +-- Eighth parameter is the sensitivity for the axis -- Parameters for bindJoystickAxisProperty: @@ -59,8 +60,6 @@ local freezeValue = function(name, axis, min, max) local isPropertyBound = true; if joystickType == "None" then isPropertyBound = false; - else - isPropertyBound = true; end if isPropertyBound then diff --git a/include/openspace/interaction/joystickcamerastates.h b/include/openspace/interaction/joystickcamerastates.h index 6bb61b1967..040bcbdff5 100644 --- a/include/openspace/interaction/joystickcamerastates.h +++ b/include/openspace/interaction/joystickcamerastates.h @@ -99,8 +99,7 @@ public: void setAxisMappingProperty(std::string joystickName, int axis, std::string propertyUri, float min = 0.f, float max = 1.f, - AxisInvert shouldInvert = AxisInvert::No, AxisFlip shouldFlip = AxisFlip::No, - bool isRemote = true + AxisInvert shouldInvert = AxisInvert::No, bool isRemote = true ); AxisInformation axisMapping(const std::string& joystickName, int axis) const; diff --git a/include/openspace/navigation/navigationhandler.h b/include/openspace/navigation/navigationhandler.h index 0451567017..fff06f53e6 100644 --- a/include/openspace/navigation/navigationhandler.h +++ b/include/openspace/navigation/navigationhandler.h @@ -114,7 +114,6 @@ public: float min = 0.f, float max = 1.f, JoystickCameraStates::AxisInvert shouldInvert = JoystickCameraStates::AxisInvert::No, - JoystickCameraStates::AxisFlip shouldFlip = JoystickCameraStates::AxisFlip::No, bool isRemote = true); JoystickCameraStates::AxisInformation joystickAxisMapping( diff --git a/src/interaction/joystickcamerastates.cpp b/src/interaction/joystickcamerastates.cpp index ef61b067de..656bd5ab5c 100644 --- a/src/interaction/joystickcamerastates.cpp +++ b/src/interaction/joystickcamerastates.cpp @@ -276,7 +276,6 @@ void JoystickCameraStates::setAxisMappingProperty(std::string joystickName, std::string propertyUri, float min, float max, AxisInvert shouldInvert, - AxisFlip shouldFlip, bool isRemote) { JoystickCameraState* joystickCameraState = findOrAddJoystickCameraState(joystickName); @@ -292,7 +291,6 @@ void JoystickCameraStates::setAxisMappingProperty(std::string joystickName, joystickCameraState->axisMapping[axis].type = AxisType::Property; joystickCameraState->axisMapping[axis].invert = shouldInvert; - joystickCameraState->axisMapping[axis].flip = shouldFlip; joystickCameraState->axisMapping[axis].propertyUri = propertyUri; joystickCameraState->axisMapping[axis].minValue = min; joystickCameraState->axisMapping[axis].maxValue = max; diff --git a/src/navigation/navigationhandler.cpp b/src/navigation/navigationhandler.cpp index 40dda9a57b..966cd0ef6c 100644 --- a/src/navigation/navigationhandler.cpp +++ b/src/navigation/navigationhandler.cpp @@ -544,7 +544,6 @@ void NavigationHandler::setJoystickAxisMappingProperty(std::string joystickName, std::string propertyUri, float min, float max, JoystickCameraStates::AxisInvert shouldInvert, - JoystickCameraStates::AxisFlip shouldFlip, bool isRemote) { _orbitalNavigator.joystickStates().setAxisMappingProperty( @@ -554,7 +553,6 @@ void NavigationHandler::setJoystickAxisMappingProperty(std::string joystickName, min, max, shouldInvert, - shouldFlip, isRemote ); } diff --git a/src/navigation/navigationhandler_lua.inl b/src/navigation/navigationhandler_lua.inl index e15d546370..d1eac62a5b 100644 --- a/src/navigation/navigationhandler_lua.inl +++ b/src/navigation/navigationhandler_lua.inl @@ -217,7 +217,6 @@ namespace { * \param min the minimum value that this axis can set for the property * \param max the maximum value that this axis can set for the property * \param shouldInvert if the joystick movement should be inverted or not - * \param shouldFlip reverses the movement of the camera that the joystick produces * \param isRemote if true, the property change will also be executed on connected nodes * if false, the property change will only affect the master node */ @@ -225,7 +224,6 @@ namespace { std::string propertyUri, float min = 0.f, float max = 1.f, bool shouldInvert = false, - bool shouldFlip = false, bool isRemote = true) { using namespace openspace; @@ -237,7 +235,6 @@ namespace { min, max, JoystickCameraStates::AxisInvert(shouldInvert), - JoystickCameraStates::AxisFlip(shouldFlip), isRemote ); }