Changeset 3286 for code/branches/core4/src/core/input/JoyStick.cc
- Timestamp:
- Jul 13, 2009, 8:54:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/core/input/JoyStick.cc
r3274 r3286 30 30 31 31 #include <ois/OISJoyStick.h> 32 #include <ois/OISInputManager.h>33 32 #include <boost/foreach.hpp> 34 33 … … 38 37 #include "util/Convert.h" 39 38 #include "InputState.h" 40 #include "InputManager.h"41 39 42 40 namespace orxonox 43 41 { 44 /** 45 @brief 46 Helper function that loads the config value vector of one coefficient 47 */ 42 //! Helper function that loads the config value vector of one coefficient 48 43 void loadCalibration(std::vector<int>& list, const std::string& sectionName, const std::string& valueName, size_t size, int defaultValue); 49 44 50 JoyStick::JoyStick(unsigned int id) 51 : super(id) 45 std::vector<std::string> JoyStick::idStrings_s; 46 47 JoyStick::JoyStick(unsigned int id, OIS::InputManager* oisInputManager) 48 : super(id, oisInputManager) 52 49 { 53 50 RegisterRootObject(JoyStick); … … 66 63 //idString_ += multi_cast<std::string>(oisDevice_->getNumberOfComponents(OIS::OIS_Vector3)); 67 64 68 if (InputManager::getInstance().checkJoyStickID(idString_) == false) 69 { 70 // Make the ID unique for this execution time. 71 idString_ += "_" + multi_cast<std::string>(this->getDeviceID()); 65 66 BOOST_FOREACH(std::string& idString, idStrings_s) 67 { 68 if (idString_ == idString) 69 { 70 // Make the ID unique for this execution time. 71 idString_ += "_" + multi_cast<std::string>(this->getDeviceID()); 72 break; 73 } 72 74 } 73 75 … … 82 84 } 83 85 84 //! <Callback for the joy stick calibration config file.86 //! Callback for the joy stick calibration config file. 85 87 void JoyStick::calibrationFileCallback() 86 88 { … … 173 175 } 174 176 175 // TODO: What do we really need to reset here?177 //! Resets the pov states 176 178 void JoyStick::clearBuffersImpl() 177 179 { 178 180 for (int j = 0; j < 4; ++j) 179 {180 181 povStates_[j] = 0; 181 sliderStates_[j][0] = 0;182 sliderStates_[j][1] = 0;183 }184 182 } 185 183
Note: See TracChangeset
for help on using the changeset viewer.