Changeset 9917 for code/branches/wiimote/src/libraries/core/input
- Timestamp:
- Dec 16, 2013, 3:35:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wiimote/src/libraries/core/input/WiiMote.cc
r9911 r9917 29 29 CommandExecutor::execute("fire 0", 0, 0); 30 30 } 31 //if(p->ExpansionDevice.GetType()==CExpansionDevice::TYPE_NUNCHUK)32 //{33 //if(p->ExpansionDevice.Nunchuk.Buttons.isPressed(CNunchukButtons::BUTTON_C))34 //CommandExecutor::execute("NewHumanController accelerate");35 //if(p->ExpansionDevice.Nunchuk.Buttons.isPressed(CNunchukButtons::BUTTON_Z))36 //CommandExecutor::execute("NewHumanController decelerate");37 //}38 //float dummyPitch, dummyYaw, dummyRoll;39 //p->Accelerometer.GetOrientation(dummyPitch, dummyRoll, dummyYaw);40 //r += dummyRoll;31 if(p->ExpansionDevice.GetType()==CExpansionDevice::TYPE_NUNCHUK) 32 { 33 if(p->ExpansionDevice.Nunchuk.Buttons.isPressed(CNunchukButtons::BUTTON_C)) 34 CommandExecutor::execute("NewHumanController accelerate"); 35 if(p->ExpansionDevice.Nunchuk.Buttons.isPressed(CNunchukButtons::BUTTON_Z)) 36 CommandExecutor::execute("NewHumanController decelerate"); 37 } 38 float dummyPitch, dummyYaw, dummyRoll; 39 p->Accelerometer.GetOrientation(dummyPitch, dummyRoll, dummyYaw); 40 r += dummyRoll; 41 41 break; 42 42 } … … 52 52 } 53 53 } 54 //r/=4;55 //std::stringstream temp;54 r/=4; 55 std::stringstream temp; 56 56 // temp << "scale "; 57 // temp << (r-lastOrientation.roll); 57 if (r>0) 58 temp << "HumanController rotateRoll 1,1"; 59 if (r<0) 60 temp << "HumanController rotateRoll -1,-1"; 61 if (r==0) 62 temp << ""; 58 63 // temp << " rotateRoll"; 59 // string com = temp.str(); 60 // orxout()<<com<<endl; 61 // //CommandExecutor::execute(com, 0, 0); 64 65 string com = temp.str(); 66 //orxout()<<com<<endl; 67 CommandExecutor::execute(com, 0, 0); 62 68 63 69 IntVector2 abs(0,0); … … 65 71 IntVector2 clippingSize(1920, 1080); 66 72 p->IR.GetCursorPosition(o.x, o.y); 67 //orxout() << "y: " << o.y << " x: " << o.x << endl;68 //orxout() << p->IR.GetNumDots() << endl;73 //orxout() << "y: " << o.y << " x: " << o.x << endl; 74 //orxout() << p->IR.GetNumDots() << endl; 69 75 rel.x = (o.x-lastCursor.x); 70 76 rel.y = (o.y-lastCursor.y);
Note: See TracChangeset
for help on using the changeset viewer.