From a7a0cfeef2e48ec12f71c51c7443e9a7c45ce410 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 5 Jun 2018 10:56:19 +1200 Subject: [PATCH] Remove some deprecated functions from the Controller API --- .../scripting/ControllerScriptingInterface.h | 3 -- .../src/controllers/ScriptingInterface.cpp | 12 ------ .../src/controllers/ScriptingInterface.h | 37 ------------------- 3 files changed, 52 deletions(-) diff --git a/interface/src/scripting/ControllerScriptingInterface.h b/interface/src/scripting/ControllerScriptingInterface.h index e16383e234..051a372aad 100644 --- a/interface/src/scripting/ControllerScriptingInterface.h +++ b/interface/src/scripting/ControllerScriptingInterface.h @@ -105,9 +105,6 @@ class ScriptEngine; *
  • {@link Controller.getValue|getValue}
  • *
  • {@link Controller.getAxisValue|getAxisValue}
  • *
  • {@link Controller.getPoseValue|getgetPoseValue}
  • - *
  • {@link Controller.getButtonValue|getButtonValue} for a particular device
  • - *
  • {@link Controller.getAxisValue(0)|getAxisValue} for a particular device
  • - *
  • {@link Controller.getPoseValue(0)|getPoseValue} for a particular device
  • *
  • {@link Controller.getActionValue|getActionValue}
  • * * diff --git a/libraries/controllers/src/controllers/ScriptingInterface.cpp b/libraries/controllers/src/controllers/ScriptingInterface.cpp index 16db22401f..f49b41cbe6 100644 --- a/libraries/controllers/src/controllers/ScriptingInterface.cpp +++ b/libraries/controllers/src/controllers/ScriptingInterface.cpp @@ -92,28 +92,16 @@ namespace controller { return userInputMapper->getValue(Input((uint32_t)source)); } - float ScriptingInterface::getButtonValue(StandardButtonChannel source, uint16_t device) const { - return getValue(Input(device, source, ChannelType::BUTTON).getID()); - } - float ScriptingInterface::getAxisValue(int source) const { auto userInputMapper = DependencyManager::get(); return userInputMapper->getValue(Input((uint32_t)source)); } - float ScriptingInterface::getAxisValue(StandardAxisChannel source, uint16_t device) const { - return getValue(Input(device, source, ChannelType::AXIS).getID()); - } - Pose ScriptingInterface::getPoseValue(const int& source) const { auto userInputMapper = DependencyManager::get(); return userInputMapper->getPose(Input((uint32_t)source)); } - Pose ScriptingInterface::getPoseValue(StandardPoseChannel source, uint16_t device) const { - return getPoseValue(Input(device, source, ChannelType::POSE).getID()); - } - QVector ScriptingInterface::getAllActions() { return DependencyManager::get()->getAllActions(); } diff --git a/libraries/controllers/src/controllers/ScriptingInterface.h b/libraries/controllers/src/controllers/ScriptingInterface.h index dacb0c8568..b0004bc12d 100644 --- a/libraries/controllers/src/controllers/ScriptingInterface.h +++ b/libraries/controllers/src/controllers/ScriptingInterface.h @@ -206,43 +206,6 @@ namespace controller { */ Q_INVOKABLE Pose getPoseValue(const int& source) const; - /**jsdoc - * Get the value of a button on a particular device. - * @function Controller.getButtonValue - * @param {StandardButtonChannel} source - The button to get the value of. - * @param {number} [device=0] - The ID of the hardware device to get the value from. The default value of - * 0 corresponds to Standard. - * @returns {number} The current value of the button if the parameters are valid, otherwise 0. - * @deprecated This function no longer works. - */ - // FIXME: This function causes a JavaScript crash: https://highfidelity.manuscript.com/f/cases/edit/14139 - Q_INVOKABLE float getButtonValue(StandardButtonChannel source, uint16_t device = 0) const; - - /**jsdoc - * Get the value of an axis control on a particular device. - * @function Controller.getAxisValue - * @variation 0 - * @param {StandardAxisChannel} source - The axis to get the value of. - * @param {number} [device=0] - The ID of the hardware device to get the value from. The default value of - * 0 corresponds to Standard. - * @returns {number} The current value of the axis if the parameters are valid, otherwise 0. - * @deprecated This function no longer works. - */ - Q_INVOKABLE float getAxisValue(StandardAxisChannel source, uint16_t device = 0) const; - - /**jsdoc - * Get the value of an pose control on a particular device. - * @function Controller.getPoseValue - * @variation 0 - * @param {StandardPoseChannel} source - The pose to get the value of. - * @param {number} [device=0] - The ID of the hardware device to get the value from. The default value of - * 0 corresponds to Standard. - * @returns {Pose} The current value of the controller pose output if the parameters are valid, otherwise an invalid - * pose with Pose.valid == false. - * @deprecated This function no longer works. - */ - Q_INVOKABLE Pose getPoseValue(StandardPoseChannel source, uint16_t device = 0) const; - /**jsdoc * Triggers a haptic pulse on connected and enabled devices that have the capability. * @function Controller.triggerHapticPulse