Changeset 314 in flair-src for trunk/demos/OpticalFlow/uav
- Timestamp:
- Mar 21, 2019, 2:04:45 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.