Revision f1d13b04 devices/DiWheelDrive/amiro_map.cpp

View differences:

devices/DiWheelDrive/amiro_map.cpp
247 247
uint8_t AmiroMap::getNearest(types::position *p1) {
248 248

  
249 249
  uint8_t actualStrategy = this->lfStrategy == EDGE_LEFT ? 1 : 2;
250
  uint32_t thresh = 1;          // TODO: find good thresh value in cm
250
  uint32_t thresh = global->nodeDistThresh;          // TODO: find good thresh value in cm
251 251
  uint8_t id = 255;
252 252
  uint32_t smallestDist = thresh;
253 253
  uint8_t currentStrategy;
......
307 307
  nodeList[id].visited |= state.strategy;
308 308
  return id;
309 309
}
310

  
311
void AmiroMap::reset(){
312
  this->nodeCount = 0;
313
  this->state.current = 0;
314
  this->state.next= 0;
315

  
316
}

Also available in: Unified diff