Changeset 401 in flair-src


Ignore:
Timestamp:
Mar 18, 2021, 11:07:59 AM (4 years ago)
Author:
Sanahuja Guillaume
Message:

resolve bug when not using hdsvisionfilter but using cameras on dm3730

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/demos/CircleFollower/uav/CMakeLists.txt

    r302 r401  
    44SET(FLAIR_USE_FILTER TRUE)
    55SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    6 SET(FLAIR_USE_VISION_FILTER TRUE)
    76SET(FLAIR_USE_META TRUE)
    87SET(FLAIR_USE_VRPN TRUE)
  • trunk/demos/Gps/uav/CMakeLists.txt

    r302 r401  
    44SET(FLAIR_USE_FILTER TRUE)
    55SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    6 SET(FLAIR_USE_VISION_FILTER TRUE)
    76SET(FLAIR_USE_META TRUE)
    87
  • trunk/demos/MixedReality/real/uav/CMakeLists.txt

    r302 r401  
    44SET(FLAIR_USE_FILTER TRUE)
    55SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    6 SET(FLAIR_USE_VISION_FILTER TRUE)
    76SET(FLAIR_USE_META TRUE)
    87SET(FLAIR_USE_VRPN TRUE)
     8
    99include($ENV{FLAIR_ROOT}/flair-src/cmake-modules/GlobalCmakeFlair.cmake)
    1010
  • trunk/demos/MixedReality/virtual/uav/CMakeLists.txt

    r302 r401  
    44SET(FLAIR_USE_FILTER TRUE)
    55SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    6 SET(FLAIR_USE_VISION_FILTER TRUE)
    76SET(FLAIR_USE_META TRUE)
    87SET(FLAIR_USE_VRPN TRUE)
  • trunk/demos/PidStandalone/uav/CMakeLists.txt

    r302 r401  
    44SET(FLAIR_USE_FILTER TRUE)
    55SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    6 SET(FLAIR_USE_VISION_FILTER TRUE)
    76SET(FLAIR_USE_META TRUE)
    87
  • trunk/demos/SimpleFleet/uav/CMakeLists.txt

    r302 r401  
    44SET(FLAIR_USE_FILTER TRUE)
    55SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    6 SET(FLAIR_USE_VISION_FILTER TRUE)
    76SET(FLAIR_USE_META TRUE)
    87SET(FLAIR_USE_VRPN TRUE)
  • trunk/demos/Skeletons/CustomReferenceAngles/CMakeLists.txt

    r302 r401  
    44SET(FLAIR_USE_FILTER TRUE)
    55SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    6 SET(FLAIR_USE_VISION_FILTER TRUE)
    76SET(FLAIR_USE_META TRUE)
    87
  • trunk/demos/Skeletons/CustomTorques/CMakeLists.txt

    r302 r401  
    44SET(FLAIR_USE_FILTER TRUE)
    55SET(FLAIR_USE_SENSOR_ACTUATOR TRUE)
    6 SET(FLAIR_USE_VISION_FILTER TRUE)
    76SET(FLAIR_USE_META TRUE)
    87
  • trunk/lib/FlairCore/src/Image.cpp

    r338 r401  
    6464void Image::RawRead(char *dst) const { Warn("non implementé\n"); }
    6565
     66char* Image::AllocFunction(ssize_t size) {
     67  return allocFunction(size);
     68}
     69
     70void Image::FreeFunction(char* buffer) {
     71 freeFunction(buffer);
     72}
     73
    6674void Image::RegisterAllocFunction(char*(*func)(ssize_t size)) {
    6775  if(allocFunction==DefaultAllocFunction) allocFunction=func;
  • trunk/lib/FlairCore/src/Image.h

    r353 r401  
    111111  static void RegisterAllocFunction(char*(*func)(ssize_t size));
    112112  static void RegisterFreeFunction(void(*func)(char* buffer));
     113  static char* AllocFunction(ssize_t size);
     114  static void FreeFunction(char* buffer);
    113115
    114116private:
  • trunk/lib/FlairSensorActuator/src/V4LCamera_impl.cpp

    r400 r401  
    2929#include <cstring>
    3030#include <sys/mman.h>
    31 #include <VisionFilter.h>
    3231
    3332using std::string;
     
    104103  if(useMemoryUsrPtr) {
    105104    for (int i = 0; i < nbBuffers; i++) {
    106       FreeFunction((char*)buffers[i]);
     105      Image::FreeFunction((char*)buffers[i]);
    107106    }
    108107  } else {
    109       FreeFunction(imageData);
     108      Image::FreeFunction(imageData);
    110109  }
    111110  close(device);
     
    212211
    213212  //allocate output data
    214   imageData = AllocFunction(self->output->GetDataType().GetSize());
     213  imageData = Image::AllocFunction(self->output->GetDataType().GetSize());
    215214  //Printf("cmem allocated %i at %x\n",output->GetDataType().GetSize(),imageData);
    216215
     
    237236
    238237  for (int i=0; i<nbBuffers; i++) {
    239     buffers[i] =AllocFunction(self->output->GetDataType().GetSize());
     238    buffers[i] =Image::AllocFunction(self->output->GetDataType().GetSize());
    240239  }
    241240
Note: See TracChangeset for help on using the changeset viewer.