Changeset 314 in flair-src
- Timestamp:
- Mar 21, 2019, 2:04:45 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ReleaseNotes
r302 r314 3 3 - new build system, now out of source; binaries are no longer provided in repositories 4 4 - corrected a bug with vrpn delta time calculation 5 - const TargetController *UavStateMachine::GetJoystick as been replaced by const TargetController *UavStateMachine::GetTargetController 6 - new method MetaDualShock3 *UavStateMachine::GetJoystick 5 7 6 8 -
trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
r311 r314 19 19 #include <DataPlot1D.h> 20 20 #include <DataPlot2D.h> 21 #include <MetaDualShock3.h>22 21 #include <FrameworkManager.h> 23 22 #include <VrpnClient.h> … … 230 229 void CircleFollower::ExtraCheckJoystick(void) { 231 230 //R1 and Circle 232 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {231 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) { 233 232 StartCircle(); 234 233 } 235 234 236 235 //R1 and Cross 237 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {236 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) { 238 237 StopCircle(); 239 238 } 240 239 241 240 //R1 and Square 242 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {241 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) { 243 242 VrpnPositionHold(); 244 243 } -
trunk/demos/CircleFollower/uav/src/main.cpp
r291 r314 18 18 #include <tclap/CmdLine.h> 19 19 #include <TargetEthController.h> 20 //#include <VisionFilter.h>21 20 22 21 using namespace TCLAP; -
trunk/demos/Gps/uav/src/DemoGps.cpp
r186 r314 163 163 void DemoGps::ExtraCheckJoystick(void) { 164 164 // R1 and Circle 165 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(4) &&165 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(4) && 166 166 (behaviourMode != BehaviourMode_t::Circle)) { 167 167 StartCircle(); … … 169 169 170 170 // R1 and Cross 171 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) &&171 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(5) && 172 172 (behaviourMode == BehaviourMode_t::Circle)) { 173 173 StopCircle(); -
trunk/demos/MixedReality/real/uav/src/CircleFollower.cpp
r292 r314 222 222 void CircleFollower::ExtraCheckJoystick(void) { 223 223 //R1 and Circle 224 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {224 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) { 225 225 StartCircle(); 226 226 } 227 227 228 228 //R1 and Cross 229 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {229 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) { 230 230 StopCircle(); 231 231 } 232 232 233 233 //R1 and Square 234 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {234 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) { 235 235 VrpnPositionHold(); 236 236 } -
trunk/demos/MixedReality/virtual/uav/src/App.cpp
r293 r314 169 169 void App::ExtraCheckJoystick(void) { 170 170 //R1 and Square 171 if(Get Joystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {171 if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) { 172 172 VrpnPositionHold(); 173 173 } -
trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp
r274 r314 102 102 u_y->UseDefaultPlot(graphLawTab->LastRowLastCol()); 103 103 104 opticalFlowGroupBox=new GroupBox(Get Joystick()->GetTab()->NewRow(),"consignes fo");104 opticalFlowGroupBox=new GroupBox(GetTargetController()->GetTab()->NewRow(),"consignes fo"); 105 105 maxXSpeed=new DoubleSpinBox(opticalFlowGroupBox->NewRow(),"debattement x"," m/s",-5,5,0.1,1); 106 106 maxYSpeed=new DoubleSpinBox(opticalFlowGroupBox->LastRowLastCol(),"debattement y"," m/s",-5,5,0.1,1); … … 131 131 switch(event) { 132 132 case Event_t::EnteringControlLoop: 133 opticalFlowReference->SetValue(0,0,Get Joystick()->GetAxisValue(1)*maxXSpeed->Value());//joy axis 0 maps to x displacement134 opticalFlowReference->SetValue(1,0,Get Joystick()->GetAxisValue(0)*maxYSpeed->Value());//joy axis 1 maps to y displacement133 opticalFlowReference->SetValue(0,0,GetTargetController()->GetAxisValue(1)*maxXSpeed->Value());//joy axis 0 maps to x displacement 134 opticalFlowReference->SetValue(1,0,GetTargetController()->GetAxisValue(0)*maxYSpeed->Value());//joy axis 1 maps to y displacement 135 135 float focal=271.76; 136 136 float z,dz; … … 164 164 static bool wasOpticalFlowModeButtonPressed=false; 165 165 // controller button R1 enters optical flow mode 166 if(Get Joystick()->IsButtonPressed(9)) { // R1166 if(GetTargetController()->IsButtonPressed(9)) { // R1 167 167 if (!wasOpticalFlowModeButtonPressed) { 168 168 wasOpticalFlowModeButtonPressed=true; -
trunk/demos/PidStandalone/uav/src/PidUav.cpp
r236 r314 91 91 static bool wasOscillatingModeButtonPressed = false; 92 92 // controller button R1 enters optical flow mode 93 if (Get Joystick()->IsButtonPressed(9)) { // R193 if (GetTargetController()->IsButtonPressed(9)) { // R1 94 94 if (!wasOscillatingModeButtonPressed) { 95 95 wasOscillatingModeButtonPressed = true; -
trunk/demos/Skeletons/CustomReferenceAngles/src/MyApp.cpp
r167 r314 83 83 void MyApp::ExtraCheckJoystick(void) { 84 84 //R1 85 if(Get Joystick()->IsButtonPressed(9) && (behaviourMode!=BehaviourMode_t::CustomReferenceAngles)) {85 if(GetTargetController()->IsButtonPressed(9) && (behaviourMode!=BehaviourMode_t::CustomReferenceAngles)) { 86 86 StartCustomAngles(); 87 87 } -
trunk/demos/Skeletons/CustomTorques/src/MyApp.cpp
r122 r314 70 70 void MyApp::ExtraCheckJoystick(void) { 71 71 //R1 72 if(Get Joystick()->IsButtonPressed(9) && (behaviourMode!=BehaviourMode_t::CustomTorques)) {72 if(GetTargetController()->IsButtonPressed(9) && (behaviourMode!=BehaviourMode_t::CustomTorques)) { 73 73 StartCustomTorques(); 74 74 }
Note:
See TracChangeset
for help on using the changeset viewer.