Changeset 214 in flair-src for trunk/lib/FlairSensorActuator/src/EmulatedController.cpp
- Timestamp:
- Feb 7, 2018, 5:49:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/EmulatedController.cpp
r202 r214 17 17 #include <cstring> 18 18 #include <string> 19 #include < cvmatrix.h>19 #include <Matrix.h> 20 20 #include <stdexcept> 21 21 … … 46 46 } 47 47 48 template<typename T> void EmulatedController::fillVectorNoMutex( cvmatrix &vector,T data[],unsigned int size) {48 template<typename T> void EmulatedController::fillVectorNoMutex(Matrix &vector,T data[],unsigned int size) { 49 49 for (unsigned int i=0; i<size; i++) { 50 50 vector.SetValueNoMutex(i,0,data[i]); … … 52 52 } 53 53 54 void EmulatedController::fillVectorNoMutex( cvmatrix &destination,cvmatrix &source,unsigned int size) {54 void EmulatedController::fillVectorNoMutex(Matrix &destination,Matrix &source,unsigned int size) { 55 55 for (unsigned int i=0; i<size; i++) { 56 56 destination.SetValueNoMutex(i,0,source.Value(i,0)); … … 69 69 70 70 void EmulatedController::AddStep(unsigned int durationMs,string description,uint16_t buttonPressed, float leftAxisX, float leftAxisY, float rightAxisX, float rightAxisY) { 71 cvmatrix *axisMatrix=new cvmatrix((IODevice *)this,4,1,floatType);71 Matrix *axisMatrix=new Matrix((IODevice *)this,4,1,floatType); 72 72 axisMatrix->SetValueNoMutex(0,0,leftAxisX); 73 73 axisMatrix->SetValueNoMutex(1,0,leftAxisY); … … 75 75 axisMatrix->SetValueNoMutex(3,0,rightAxisY); 76 76 77 cvmatrix *buttonMatrix=new cvmatrix((IODevice *)this,16,1,SignedIntegerType(8));77 Matrix *buttonMatrix=new Matrix((IODevice *)this,16,1,SignedIntegerType(8)); 78 78 if (buttonPressed&(uint16_t)ButtonType::start) buttonMatrix->SetValueNoMutex(0,0,1); 79 79 if (buttonPressed&(uint16_t)ButtonType::select) buttonMatrix->SetValueNoMutex(1,0,1); … … 98 98 } 99 99 100 void EmulatedController::ComputeControllerData(DataType dataType, cvmatrix &data) {100 void EmulatedController::ComputeControllerData(DataType dataType, Matrix &data) { 101 101 static Time startStepTime=GetTime(); 102 102 … … 130 130 } 131 131 132 void EmulatedController::AcquireAxisData(core:: cvmatrix &axis) {132 void EmulatedController::AcquireAxisData(core::Matrix &axis) { 133 133 ComputeControllerData(DataType::axis,axis); 134 134 } 135 135 136 void EmulatedController::AcquireButtonData(core:: cvmatrix &button) {136 void EmulatedController::AcquireButtonData(core::Matrix &button) { 137 137 ComputeControllerData(DataType::button,button); 138 138 }
Note:
See TracChangeset
for help on using the changeset viewer.