[Orxonox-commit 5191] r9856 - code/branches/wiimote/src/libraries/core/input

georgr at orxonox.net georgr at orxonox.net
Mon Dec 2 16:00:46 CET 2013


Author: georgr
Date: 2013-12-02 16:00:46 +0100 (Mon, 02 Dec 2013)
New Revision: 9856

Modified:
   code/branches/wiimote/src/libraries/core/input/InputManager.cc
   code/branches/wiimote/src/libraries/core/input/WiiMote.cc
Log:
still trying to get quicker reaction to button presses

Modified: code/branches/wiimote/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/wiimote/src/libraries/core/input/InputManager.cc	2013-12-02 14:54:37 UTC (rev 9855)
+++ code/branches/wiimote/src/libraries/core/input/InputManager.cc	2013-12-02 15:00:46 UTC (rev 9856)
@@ -259,6 +259,7 @@
     	                 devices_.push_back(new WiiMote((unsigned int)devices_.size(), *i, wii));
     	                 //devices_[2] = new WiiMote(devices_.size(), *(new CWiimote()));
     	                 orxout()<< "Size of devices vector after wiimote insertion:" << devices_.size() << std::endl;
+    	                 wiimote.SetMotionSensingMode(CWiimote::ON);
 
     	               }
     	               catch(std::exception& e)  //gotta catch em all

Modified: code/branches/wiimote/src/libraries/core/input/WiiMote.cc
===================================================================
--- code/branches/wiimote/src/libraries/core/input/WiiMote.cc	2013-12-02 14:54:37 UTC (rev 9855)
+++ code/branches/wiimote/src/libraries/core/input/WiiMote.cc	2013-12-02 15:00:46 UTC (rev 9856)
@@ -18,13 +18,13 @@
 		  //orxout(user_warning) << "pointer is not null, yay" << std::endl;
 		if (PWii->Poll())
 		{
-			CWiimote::EventTypes e = p->GetEvent();
+			//CWiimote::EventTypes e = p->GetEvent();
 			if(p->Buttons.isPressed(CButtons::BUTTON_A)||p->Buttons.isJustPressed(CButtons::BUTTON_A))
 				{
 					CommandExecutor::execute("fire 0", 0, 0);
 				}
 			Orientation o;
-			p->SetMotionSensingMode(CWiimote::ON);
+
 			p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw);
 			int x = (int)(500*(o.yaw-lastOrientation.yaw)/time.getDeltaTime());
 			int y = (int)((o.pitch-lastOrientation.pitch)/time.getDeltaTime());




More information about the Orxonox-commit mailing list