Ignore:
Timestamp:
Dec 16, 2020, 9:40:44 AM (9 months ago)
Author:
Sanahuja Guillaume
Message:

ugv update

File:
1 edited

Legend:

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

    r376 r377  
    3131namespace actuator {
    3232
    33 SimulatedUgvControls::SimulatedUgvControls(const IODevice *parent,string name, uint32_t modelId,uint32_t deviceId)
    34     : UgvControls(parent,name) {
     33SimulatedUgvControls::SimulatedUgvControls(string name, uint32_t modelId,uint32_t deviceId)
     34    : UgvControls(name) {
    3535 
    36   shmem = new SharedMem((Thread *)this, ShMemName(modelId, deviceId),2 * sizeof(float)+sizeof(Time));
     36  shmem = new SharedMem(this, ShMemName(modelId, deviceId),2 * sizeof(float)+sizeof(Time));
    3737 
    3838  buf=(char*)malloc(2 * sizeof(float)+sizeof(Time));
     
    5757void SimulatedUgvControls::SetControls(float speed,float turn) {
    5858  float *values=(float*)buf;
    59   buf[0]=speed;
    60   buf[1]=turn;
     59  values[0]=speed;
     60  values[1]=turn;
    6161  Time time=GetTime();
    6262  memcpy(buf+2 * sizeof(float),&time,sizeof(Time));
     
    6767  output->GetMutex();
    6868  for (int i = 0; i < 2; i++) {
    69     output->SetValueNoMutex(i, 0, buf[i]);
     69    output->SetValueNoMutex(i, 0, values[i]);
    7070  }
    7171  output->ReleaseMutex();
Note: See TracChangeset for help on using the changeset viewer.