Ignore:
Timestamp:
02/07/18 17:49:27 (4 years ago)
Author:
Sanahuja Guillaume
Message:

matrix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/EmulatedController.cpp

    r202 r214  
    1717#include <cstring>
    1818#include <string>
    19 #include <cvmatrix.h>
     19#include <Matrix.h>
    2020#include <stdexcept>
    2121
     
    4646}
    4747
    48 template<typename T> void EmulatedController::fillVectorNoMutex(cvmatrix &vector,T data[],unsigned int size) {
     48template<typename T> void EmulatedController::fillVectorNoMutex(Matrix &vector,T data[],unsigned int size) {
    4949    for (unsigned int i=0; i<size; i++) {
    5050        vector.SetValueNoMutex(i,0,data[i]);
     
    5252}
    5353
    54 void EmulatedController::fillVectorNoMutex(cvmatrix &destination,cvmatrix &source,unsigned int size) {
     54void EmulatedController::fillVectorNoMutex(Matrix &destination,Matrix &source,unsigned int size) {
    5555    for (unsigned int i=0; i<size; i++) {
    5656        destination.SetValueNoMutex(i,0,source.Value(i,0));
     
    6969
    7070void 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);
    7272    axisMatrix->SetValueNoMutex(0,0,leftAxisX);
    7373    axisMatrix->SetValueNoMutex(1,0,leftAxisY);
     
    7575    axisMatrix->SetValueNoMutex(3,0,rightAxisY);
    7676
    77     cvmatrix *buttonMatrix=new cvmatrix((IODevice *)this,16,1,SignedIntegerType(8));
     77    Matrix *buttonMatrix=new Matrix((IODevice *)this,16,1,SignedIntegerType(8));
    7878    if (buttonPressed&(uint16_t)ButtonType::start) buttonMatrix->SetValueNoMutex(0,0,1);
    7979    if (buttonPressed&(uint16_t)ButtonType::select) buttonMatrix->SetValueNoMutex(1,0,1);
     
    9898}
    9999
    100 void EmulatedController::ComputeControllerData(DataType dataType, cvmatrix &data) {
     100void EmulatedController::ComputeControllerData(DataType dataType, Matrix &data) {
    101101    static Time startStepTime=GetTime();
    102102
     
    130130}
    131131
    132 void EmulatedController::AcquireAxisData(core::cvmatrix &axis) {
     132void EmulatedController::AcquireAxisData(core::Matrix &axis) {
    133133    ComputeControllerData(DataType::axis,axis);
    134134}
    135135
    136 void EmulatedController::AcquireButtonData(core::cvmatrix &button) {
     136void EmulatedController::AcquireButtonData(core::Matrix &button) {
    137137    ComputeControllerData(DataType::button,button);
    138138}
Note: See TracChangeset for help on using the changeset viewer.