Changeset 214 in flair-src for trunk/lib/FlairSensorActuator/src
- Timestamp:
- Feb 7, 2018, 5:49:27 PM (7 years ago)
- Location:
- trunk/lib/FlairSensorActuator/src
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/AfroBldc_impl.cpp
r15 r214 22 22 #include <SpinBox.h> 23 23 #include <Label.h> 24 #include < cvmatrix.h>24 #include <Matrix.h> 25 25 #include <string.h> 26 26 -
trunk/lib/FlairSensorActuator/src/BlCtrlV2_impl.cpp
r15 r214 23 23 #include <SpinBox.h> 24 24 #include <Label.h> 25 #include < cvmatrix.h>25 #include <Matrix.h> 26 26 #include <string.h> 27 27 … … 96 96 97 97 // on prend une fois pour toute le mutex et on fait des accès directs 98 cvmatrix *output = self->output;98 Matrix *output = self->output; 99 99 output->GetMutex(); 100 100 for (int i = 0; i < nb_mot; i++) -
trunk/lib/FlairSensorActuator/src/BlCtrlV2_x4_speed.cpp
r170 r214 25 25 #include <ComboBox.h> 26 26 #include <PushButton.h> 27 #include < cvmatrix.h>27 #include <Matrix.h> 28 28 #include <Mutex.h> 29 29 #include <FrameworkManager.h> … … 119 119 pas->AddItem("inverse"); 120 120 121 input = new cvmatrix((IODevice *)this, 8, 1, floatType);121 input = new Matrix((IODevice *)this, 8, 1, floatType); 122 122 123 123 cvmatrix_descriptor *desc = new cvmatrix_descriptor(4, 2); … … 131 131 desc->SetElementName(2, 1, "cons avant droite"); 132 132 desc->SetElementName(3, 1, "cons arriere gauche"); 133 output = new cvmatrix((IODevice *)this, desc, floatType);133 output = new Matrix((IODevice *)this, desc, floatType); 134 134 delete desc; 135 135 -
trunk/lib/FlairSensorActuator/src/BlCtrlV2_x4_speed.h
r137 r214 24 24 namespace flair { 25 25 namespace core { 26 class cvmatrix;26 class Matrix; 27 27 class I2cPort; 28 28 } … … 97 97 98 98 // matrix 99 core:: cvmatrix *input;100 core:: cvmatrix *output;99 core::Matrix *input; 100 core::Matrix *output; 101 101 102 102 int tested_motor; -
trunk/lib/FlairSensorActuator/src/Bldc.cpp
r157 r214 18 18 #include "Bldc.h" 19 19 #include "Bldc_impl.h" 20 #include < cvmatrix.h>20 #include <Matrix.h> 21 21 #include <DoubleSpinBox.h> 22 22 #include <sstream> … … 53 53 } 54 54 55 output = new cvmatrix(this, desc, floatType);55 output = new Matrix(this, desc, floatType); 56 56 delete desc; 57 57 AddDataToLog(output); … … 81 81 uint8_t Bldc::MotorsCount(void) const { return pimpl_->motors_count; } 82 82 83 cvmatrix *Bldc::Output(void) const { return output; }83 Matrix *Bldc::Output(void) const { return output; } 84 84 85 85 bool Bldc::AreEnabled(void) const { return pimpl_->are_enabled; } -
trunk/lib/FlairSensorActuator/src/Bldc.h
r170 r214 19 19 namespace flair { 20 20 namespace core { 21 class cvmatrix;21 class Matrix; 22 22 } 23 23 namespace gui { … … 96 96 * 97 97 */ 98 core:: cvmatrix *Output(void) const;98 core::Matrix *Output(void) const; 99 99 100 100 /*! … … 161 161 162 162 protected: 163 core:: cvmatrix *output;163 core::Matrix *output; 164 164 165 165 private: -
trunk/lib/FlairSensorActuator/src/Bldc_impl.cpp
r137 r214 20 20 #include <GroupBox.h> 21 21 #include <DoubleSpinBox.h> 22 #include < cvmatrix.h>22 #include <Matrix.h> 23 23 #include <Label.h> 24 24 #include <PushButton.h> … … 110 110 111 111 void Bldc_impl::UpdateFrom(const io_data *data) { 112 cvmatrix *input = (cvmatrix *)data;112 Matrix *input = (Matrix *)data; 113 113 bool is_motor_running = false; 114 114 -
trunk/lib/FlairSensorActuator/src/Camera.cpp
r169 r214 119 119 if(logFormat==LogFormat::JPG) { 120 120 data->GetMutex(); 121 IplImage *img=((cvimage*)data)->img; 121 //IplImage *img=((cvimage*)data)->img; 122 const cvimage* input = dynamic_cast<const cvimage*>(data); 123 if (!input) { 124 Warn("casting %s to cvimage failed\n",data->ObjectName().c_str()); 125 return; 126 } 127 IplImage *img=input->img; 128 122 129 string filename=getFrameworkManager()->GetLogPath()+"/"+ObjectName()+"_"+std::to_string(data->DataTime())+".jpg"; 123 130 switch(((cvimage*)data)->GetDataType().GetFormat()) { -
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 } -
trunk/lib/FlairSensorActuator/src/EmulatedController.h
r137 r214 21 21 namespace flair { 22 22 namespace core { 23 class cvmatrix;23 class Matrix; 24 24 } 25 25 namespace gui { … … 52 52 bool ProcessMessage(core::Message *msg); 53 53 bool IsDataFrameReady(); 54 void AcquireAxisData(core:: cvmatrix &axis); //responsible for getting the axis data from the hardware55 void AcquireButtonData(core:: cvmatrix &button); //responsible for getting the button data from the hardware54 void AcquireAxisData(core::Matrix &axis); //responsible for getting the axis data from the hardware 55 void AcquireButtonData(core::Matrix &button); //responsible for getting the button data from the hardware 56 56 bool ControllerInitialization(); 57 57 58 58 private: 59 59 enum class DataType { axis,button }; 60 void ComputeControllerData(DataType dataType, core:: cvmatrix &data);61 template<typename T> void fillVectorNoMutex(core:: cvmatrix &vector,T data[],unsigned int size);62 void fillVectorNoMutex(core:: cvmatrix &destination,core::cvmatrix &source,unsigned int size);60 void ComputeControllerData(DataType dataType, core::Matrix &data); 61 template<typename T> void fillVectorNoMutex(core::Matrix &vector,T data[],unsigned int size); 62 void fillVectorNoMutex(core::Matrix &destination,core::Matrix &source,unsigned int size); 63 63 struct StepData { 64 64 unsigned int durationMs; //milliseconds 65 core:: cvmatrix *axisData;66 core:: cvmatrix *buttonData;65 core::Matrix *axisData; 66 core::Matrix *buttonData; 67 67 std::string description; 68 68 void Print(); -
trunk/lib/FlairSensorActuator/src/HokuyoUTM30Lx.cpp
r170 r214 21 21 #include <FrameworkManager.h> 22 22 #include <RangeFinderPlot.h> 23 #include < cvmatrix.h>23 #include <Matrix.h> 24 24 #include <Tab.h> 25 25 #include <sstream> … … 40 40 main_tab = new Tab(getFrameworkManager()->GetTabWidget(), name); 41 41 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1081, 1); 42 output = new cvmatrix((IODevice *)this, desc, SignedIntegerType(16));42 output = new Matrix((IODevice *)this, desc, SignedIntegerType(16)); 43 43 delete desc; 44 44 … … 246 246 #endif 247 247 } 248 cvmatrix *HokuyoUTM30Lx::getDatas() { return output; }248 Matrix *HokuyoUTM30Lx::getDatas() { return output; } 249 249 250 250 void HokuyoUTM30Lx::UseDefaultPlot(void) { -
trunk/lib/FlairSensorActuator/src/HokuyoUTM30Lx.h
r170 r214 23 23 namespace flair { 24 24 namespace core { 25 class cvmatrix;25 class Matrix; 26 26 class SerialPort; 27 27 class Mutex; … … 56 56 void getMesure(int startStep, int endStep, int clusterCount, int interval, 57 57 int scanNumber = 0); 58 core:: cvmatrix *getDatas(void);58 core::Matrix *getDatas(void); 59 59 60 60 /*! … … 78 78 79 79 // matrix 80 core:: cvmatrix *output;80 core::Matrix *output; 81 81 82 82 std::queue<std::string> bufRet; -
trunk/lib/FlairSensorActuator/src/HostEthController.cpp
r178 r214 18 18 #include "HostEthController.h" 19 19 #include <Controller.h> 20 #include < cvmatrix.h>20 #include <Matrix.h> 21 21 #include <Tab.h> 22 22 #include <TabWidget.h> -
trunk/lib/FlairSensorActuator/src/HostEthController.h
r178 r214 26 26 namespace flair { 27 27 namespace core { 28 class cvmatrix;28 class Matrix; 29 29 class TcpSocket; 30 30 class UdpSocket; … … 81 81 GetAxisData() = 0; // responsible for getting the axis data from the hardware 82 82 unsigned int axisNumber; 83 core:: cvmatrix *axis;83 core::Matrix *axis; 84 84 gui::DataPlot1D **axisPlot; 85 85 uint32_t bitsPerAxis; … … 90 90 // from the hardware 91 91 unsigned int buttonNumber; 92 core:: cvmatrix *button;92 core::Matrix *button; 93 93 uint8_t buttonOffset; 94 94 bool meaningfulDataAvailable; -
trunk/lib/FlairSensorActuator/src/LaserRangeFinder.cpp
r148 r214 17 17 18 18 #include "LaserRangeFinder.h" 19 #include < cvmatrix.h>19 #include <Matrix.h> 20 20 #include <Tab.h> 21 21 #include <TabWidget.h> … … 38 38 : IODevice(getFrameworkManager(), name) { 39 39 cvmatrix_descriptor *desc = new cvmatrix_descriptor(360, 1); 40 output = new cvmatrix(this, desc, floatType);40 output = new Matrix(this, desc, floatType); 41 41 delete desc; 42 42 AddDataToLog(output); -
trunk/lib/FlairSensorActuator/src/LaserRangeFinder.h
r170 r214 19 19 namespace core { 20 20 class FrameworkManager; 21 class cvmatrix;21 class Matrix; 22 22 } 23 23 namespace gui { … … 102 102 * \return output matrix 103 103 */ 104 core:: cvmatrix *output;104 core::Matrix *output; 105 105 106 106 /*! -
trunk/lib/FlairSensorActuator/src/NmeaGps.cpp
r206 r214 176 176 177 177 int result; 178 Printf("%s\n",frame);179 Printf("%x %x\n",&parser,parser.buffer);180 178 result = nmea_parse(&parser, frame, frame_size, &info); 181 Printf("%x %x\n",&parser,parser.buffer);179 182 180 if (result != 1) { 183 181 Warn("unrecognized nmea sentence: %s\n",frame); 184 182 return; 185 183 } 186 Printf("3\n"); 187 Printf("%x %x\n",&parser,parser.buffer); 184 188 185 result = nmea_parse_GPGGA(frame, frame_size, &pack); 189 Printf("%x %x\n",&parser,parser.buffer); 186 190 187 if (result == 1) { 191 Printf("%x %x\n",&parser,parser.buffer);192 188 nmea_info2pos(&info, &pos); 193 Printf("%x %x\n",&parser,parser.buffer);194 189 // Printf("nb:%i fix:%i lat:%f long:%f alt:%f vel:%f angle:%f\n",pack.satinuse,pack.sig,info.lat,info.lon,info.elv,info.speed*1000./3600.,info.direction); 195 190 //Printf("lat:%f long:%f\n",pos.lat,pos.lon); -
trunk/lib/FlairSensorActuator/src/RadioReceiver.cpp
r157 r214 20 20 #include <TabWidget.h> 21 21 #include <FrameworkManager.h> 22 #include < cvmatrix.h>22 #include <Matrix.h> 23 23 #include <sstream> 24 24 … … 44 44 desc->SetElementName(i, 0, channel_name.str()); 45 45 } 46 output = new cvmatrix(this, desc, floatType, name);46 output = new Matrix(this, desc, floatType, name); 47 47 delete desc; 48 48 -
trunk/lib/FlairSensorActuator/src/RadioReceiver.h
r137 r214 19 19 namespace flair { 20 20 namespace core { 21 class cvmatrix;21 class Matrix; 22 22 } 23 23 namespace gui { … … 87 87 void UpdateFrom(const core::io_data *data){}; 88 88 89 core:: cvmatrix *output;89 core::Matrix *output; 90 90 bool is_connected; 91 91 unsigned int nb_channels; -
trunk/lib/FlairSensorActuator/src/SimuBldc.cpp
r158 r214 21 21 #include <GroupBox.h> 22 22 #include <SharedMem.h> 23 #include < cvmatrix.h>23 #include <Matrix.h> 24 24 #include <sstream> 25 #include <string.h> 25 26 26 27 using std::string; … … 36 37 : Bldc(parent, layout, name, motors_count) { 37 38 shmem = 38 new SharedMem(this, ShMemName(modelId, deviceId), motors_count * sizeof(float) );39 new SharedMem(this, ShMemName(modelId, deviceId), motors_count * sizeof(float)+sizeof(Time)); 39 40 40 41 GroupBox *groupbox = new GroupBox(layout->NewRow(), "simubldc"); 41 42 k = new DoubleSpinBox(groupbox->NewRow(), "k driver:", 0, 10000, 1); 42 43 44 buf=(char*)malloc(motors_count * sizeof(float)+sizeof(Time)); 45 if(buf==NULL) { 46 Err("error creating buffer\n"); 47 return; 48 } 43 49 SetIsReady(true); 44 50 } … … 48 54 : Bldc(parent, name, motors_count) { 49 55 shmem = 50 new SharedMem(this, ShMemName(modelId, deviceId), motors_count * sizeof(float)); 56 new SharedMem(this, ShMemName(modelId, deviceId), motors_count * sizeof(float)+sizeof(Time)); 57 58 buf=(char*)malloc(motors_count * sizeof(float)+sizeof(Time)); 59 if(buf==NULL) { 60 Err("error creating buffer\n"); 61 return; 62 } 63 64 // reset values 65 float *values=(float*)buf; 66 for (int i = 0; i < motors_count; i++) values[i] = 0; 67 Time time=GetTime(); 68 memcpy(buf+motors_count * sizeof(float),&time,sizeof(Time)); 51 69 52 // reset values 53 float values[motors_count]; 54 for (int i = 0; i < motors_count; i++) 55 values[i] = 0; 56 57 shmem->Write((char *)&values, motors_count * sizeof(float)); 70 shmem->Write(buf, motors_count * sizeof(float)+sizeof(Time)); 58 71 59 72 SetIsReady(true); 60 73 } 61 74 62 SimuBldc::~SimuBldc() {} 75 SimuBldc::~SimuBldc() { 76 if(buf!=NULL) free(buf); 77 } 63 78 64 79 string SimuBldc::ShMemName(uint32_t modelId,uint32_t deviceId) { … … 69 84 70 85 void SimuBldc::SetMotors(float *value) { 71 float values[MotorsCount()]; 86 float *values=(float*)buf; 87 for (int i = 0; i < MotorsCount(); i++) values[i] = k->Value() * value[i]; 88 Time time=GetTime(); 89 memcpy(buf+MotorsCount() * sizeof(float),&time,sizeof(Time)); 72 90 73 for (int i = 0; i < MotorsCount(); i++) 74 values[i] = k->Value() * value[i]; 75 76 shmem->Write((char *)&values, MotorsCount() * sizeof(float)); 91 shmem->Write(buf, MotorsCount() * sizeof(float)+sizeof(Time)); 77 92 78 93 // on prend une fois pour toute le mutex et on fait des accès directs 79 94 output->GetMutex(); 80 for (int i = 0; i < MotorsCount(); i++) 95 for (int i = 0; i < MotorsCount(); i++) { 81 96 output->SetValueNoMutex(i, 0, values[i]); 97 } 82 98 output->ReleaseMutex(); 83 99 } 84 100 85 void SimuBldc::GetSpeeds(float *value) const { 86 float values[MotorsCount()]; 87 shmem->Read((char *)&values, MotorsCount() * sizeof(float)); 101 void SimuBldc::GetSpeeds(float *value,Time* time) const { 102 float *values=(float*)buf; 103 shmem->Read(buf, MotorsCount() * sizeof(float)+sizeof(Time)); 104 memcpy(time,buf+MotorsCount() * sizeof(float),sizeof(Time)); 88 105 89 for (int i = 0; i < MotorsCount(); i++) 106 for (int i = 0; i < MotorsCount(); i++) { 90 107 value[i] = values[i]; 108 } 91 109 } 92 110 -
trunk/lib/FlairSensorActuator/src/SimuBldc.h
r158 r214 20 20 class SharedMem; 21 21 class IODevice; 22 class cvmatrix;22 class Matrix; 23 23 } 24 24 namespace gui { … … 78 78 * 79 79 * \param value array to store motors speeds 80 * \param time time when shared memory was written 80 81 */ 81 void GetSpeeds(float *value ) const;82 void GetSpeeds(float *value,core::Time* time) const; 82 83 83 84 /*! … … 113 114 core::SharedMem *shmem; 114 115 gui::DoubleSpinBox *k; 116 char *buf; 117 115 118 }; 116 119 } // end namespace actuator -
trunk/lib/FlairSensorActuator/src/SimuGps.cpp
r206 r214 25 25 #include <GroupBox.h> 26 26 #include <Euler.h> 27 #include < cvmatrix.h>27 #include <Matrix.h> 28 28 #include <sstream> 29 29 #include "geodesie.h" … … 80 80 void SimuGps::UpdateFrom(const io_data *data) { 81 81 if (data != NULL) { 82 cvmatrix *input = (cvmatrix *)data;82 Matrix *input = (Matrix *)data; 83 83 gps_states_t state; 84 84 … … 109 109 vtg.spk_k='K'; 110 110 vtg.spn_n='N'; 111 gga.elv_units='M'; 112 gga.diff_units='M'; 111 113 112 114 if (dataRate == NULL) { … … 152 154 gga.satinuse=numberOfSatellites->Value(); 153 155 154 nmea_gen_GPGGA(buf,sizeof(buf),&gga); 155 Printf("1\n"); 156 parseFrame(buf,sizeof(buf)); 157 156 int size=nmea_gen_GPGGA(buf,sizeof(buf),&gga); 157 parseFrame(buf,size); 158 158 159 vtg.dir=90-Euler::ToDegree(atan2f(state.vn,state.ve)); 159 160 vtg.spk=sqrtf(state.ve*state.ve+state.vn*state.vn)*3600./1000.; 160 nmea_gen_GPVTG(buf,sizeof(buf),&vtg); 161 Printf("2\n"); 162 parseFrame(buf,sizeof(buf)); 161 size=nmea_gen_GPVTG(buf,sizeof(buf),&vtg); 162 parseFrame(buf,size); 163 163 } 164 164 -
trunk/lib/FlairSensorActuator/src/SimuImu.cpp
r202 r214 21 21 #include <SpinBox.h> 22 22 #include <GroupBox.h> 23 #include < cvmatrix.h>23 #include <Matrix.h> 24 24 #include <SharedMem.h> 25 25 #include <AhrsData.h> … … 70 70 void SimuImu::UpdateFrom(const io_data *data) { 71 71 if (data != NULL) { 72 cvmatrix *input = (cvmatrix *)data;72 Matrix *input = (Matrix *)data; 73 73 imu_states_t state; 74 74 -
trunk/lib/FlairSensorActuator/src/SimuLaser.cpp
r158 r214 20 20 #include <SpinBox.h> 21 21 #include <GroupBox.h> 22 #include < cvmatrix.h>22 #include <Matrix.h> 23 23 #include <SharedMem.h> 24 24 #include <sstream> -
trunk/lib/FlairSensorActuator/src/SimuUs.cpp
r158 r214 20 20 #include <SpinBox.h> 21 21 #include <GroupBox.h> 22 #include < cvmatrix.h>22 #include <Matrix.h> 23 23 #include <SharedMem.h> 24 24 #include <sstream> -
trunk/lib/FlairSensorActuator/src/Srf08.cpp
r157 r214 21 21 #include <GroupBox.h> 22 22 #include <SpinBox.h> 23 #include < cvmatrix.h>23 #include <Matrix.h> 24 24 #include <string.h> 25 25 #include <errno.h> -
trunk/lib/FlairSensorActuator/src/TargetController.cpp
r202 r214 20 20 #include <Tab.h> 21 21 #include <FrameworkManager.h> 22 #include < cvmatrix.h>22 #include <Matrix.h> 23 23 24 24 #include <cstring> … … 122 122 } else { 123 123 124 axis = new cvmatrix((IODevice *)this, axisNumber, 1, floatType);124 axis = new Matrix((IODevice *)this, axisNumber, 1, floatType); 125 125 button = 126 new cvmatrix((IODevice *)this, buttonNumber, 1, SignedIntegerType(8));126 new Matrix((IODevice *)this, buttonNumber, 1, SignedIntegerType(8)); 127 127 128 128 while (!ToBeStopped()) { -
trunk/lib/FlairSensorActuator/src/TargetController.h
r137 r214 27 27 namespace core { 28 28 class FrameworkManager; 29 class cvmatrix;29 class Matrix; 30 30 class Socket; 31 31 class io_data; … … 82 82 // axis stuff 83 83 unsigned int axisNumber; 84 core:: cvmatrix *axis = NULL;85 virtual void AcquireAxisData(core:: cvmatrix &axis) = 0; // responsible for84 core::Matrix *axis = NULL; 85 virtual void AcquireAxisData(core::Matrix &axis) = 0; // responsible for 86 86 // getting the axis 87 87 // data from the … … 90 90 // button stuff 91 91 unsigned int buttonNumber; 92 core:: cvmatrix *button = NULL;93 virtual void AcquireButtonData(core:: cvmatrix &button) = 0; // responsible for92 core::Matrix *button = NULL; 93 virtual void AcquireButtonData(core::Matrix &button) = 0; // responsible for 94 94 // getting the 95 95 // button data -
trunk/lib/FlairSensorActuator/src/TargetEthController.cpp
r202 r214 24 24 #include <cstring> 25 25 #include <string> 26 #include < cvmatrix.h>26 #include <Matrix.h> 27 27 #include <stdexcept> 28 28 … … 150 150 } 151 151 152 void TargetEthController::AcquireAxisData(core:: cvmatrix &axis) {152 void TargetEthController::AcquireAxisData(core::Matrix &axis) { 153 153 axis.GetMutex(); 154 154 // char testFrameBuffer[3]={(char)0x09,(char)0x59,(char)0xB8}; … … 166 166 } 167 167 168 void TargetEthController::AcquireButtonData(core:: cvmatrix &button) {168 void TargetEthController::AcquireButtonData(core::Matrix &button) { 169 169 uint8_t buttonValue; 170 170 int currentButton = 0; -
trunk/lib/FlairSensorActuator/src/TargetEthController.h
r178 r214 27 27 namespace core { 28 28 class FrameworkManager; 29 class cvmatrix;29 class Matrix; 30 30 class TcpSocket; 31 31 class UdpSocket; … … 62 62 63 63 bool IsDataFrameReady(); 64 void AcquireAxisData(core:: cvmatrix &axis); // responsible for getting the64 void AcquireAxisData(core::Matrix &axis); // responsible for getting the 65 65 // axis data from the hardware 66 void AcquireButtonData(core:: cvmatrix &button); // responsible for getting the66 void AcquireButtonData(core::Matrix &button); // responsible for getting the 67 67 // button data from the 68 68 // hardware -
trunk/lib/FlairSensorActuator/src/UsRangeFinder.cpp
r148 r214 23 23 #include <Layout.h> 24 24 #include <DataPlot1D.h> 25 #include < cvmatrix.h>25 #include <Matrix.h> 26 26 27 27 using std::string; … … 38 38 cvmatrix_descriptor *desc = new cvmatrix_descriptor(1, 1); 39 39 desc->SetElementName(0, 0, name); 40 output = new cvmatrix(this, desc, floatType);40 output = new Matrix(this, desc, floatType); 41 41 delete desc; 42 42 AddDataToLog(output); -
trunk/lib/FlairSensorActuator/src/UsRangeFinder.h
r137 r214 17 17 18 18 namespace flair { 19 namespace core {20 class cvmatrix;21 }22 namespace gui {23 class Tab;24 class TabWidget;25 class GroupBox;26 class Layout;27 class DataPlot1D;28 }19 namespace core { 20 class Matrix; 21 } 22 namespace gui { 23 class Tab; 24 class TabWidget; 25 class GroupBox; 26 class Layout; 27 class DataPlot1D; 28 } 29 29 } 30 30 … … 119 119 * \return output matrix 120 120 */ 121 core:: cvmatrix *output;121 core::Matrix *output; 122 122 123 123 /*! -
trunk/lib/FlairSensorActuator/src/VrpnObject.cpp
r167 r214 20 20 #include "VrpnClient.h" 21 21 #include <string.h> 22 23 #include <cvmatrix.h> 22 #include <Matrix.h> 24 23 25 24 using std::string; … … 53 52 } 54 53 55 cvmatrix *VrpnObject::Output(void) const { return pimpl_->output; }54 Matrix *VrpnObject::Output(void) const { return pimpl_->output; } 56 55 57 cvmatrix *VrpnObject::State(void) const { return pimpl_->state; }56 Matrix *VrpnObject::State(void) const { return pimpl_->state; } 58 57 59 58 Tab *VrpnObject::GetPlotTab(void) const { return pimpl_->plot_tab; } -
trunk/lib/FlairSensorActuator/src/VrpnObject.h
r167 r214 21 21 namespace flair { 22 22 namespace core { 23 class cvmatrix;23 class Matrix; 24 24 class Quaternion; 25 25 } … … 126 126 * \return Output matrix 127 127 */ 128 core:: cvmatrix *Output(void) const;128 core::Matrix *Output(void) const; 129 129 130 130 /*! … … 139 139 * \return State matrix 140 140 */ 141 core:: cvmatrix *State(void) const;141 core::Matrix *State(void) const; 142 142 143 143 /*! -
trunk/lib/FlairSensorActuator/src/VrpnObject_impl.cpp
r167 r214 25 25 #include <unistd.h> 26 26 #include <vrpn_Connection.h> 27 #include < cvmatrix.h>27 #include <Matrix.h> 28 28 #include <Tab.h> 29 29 #include <TabWidget.h> … … 65 65 desc->SetElementName(5, 0, "y"); 66 66 desc->SetElementName(6, 0, "z"); 67 output = new cvmatrix(self, desc, floatType);67 output = new Matrix(self, desc, floatType); 68 68 delete desc; 69 69 … … 72 72 desc->SetElementName(1, 0, "pitch"); 73 73 desc->SetElementName(2, 0, "yaw"); 74 state = new cvmatrix(self, desc, floatType);74 state = new Matrix(self, desc, floatType); 75 75 delete desc; 76 76 -
trunk/lib/FlairSensorActuator/src/XBldc_impl.cpp
r15 r214 19 19 #include "XBldc.h" 20 20 #include <I2cPort.h> 21 #include < cvmatrix.h>21 #include <Matrix.h> 22 22 #include <string.h> 23 23 -
trunk/lib/FlairSensorActuator/src/unexported/VrpnObject_impl.h
r167 r214 28 28 namespace flair { 29 29 namespace core { 30 class cvmatrix;30 class Matrix; 31 31 } 32 32 namespace gui { … … 58 58 flair::gui::DataPlot1D *y_plot; 59 59 flair::gui::DataPlot1D *z_plot; 60 flair::core:: cvmatrix *output, *state;60 flair::core::Matrix *output, *state; 61 61 62 62 static void VRPN_CALLBACK handle_pos(void *userdata, const vrpn_TRACKERCB t);
Note:
See TracChangeset
for help on using the changeset viewer.