Project

General

Profile

Revision b2876335

IDb2876335edd4f974c012a2e0847482eb5d5a96c8

Added by roboclub about 12 years ago

fixed scheduler array access, no more segfaulting, but hangs

View differences:

scout/libscout/src/behaviors/Scheduler.cpp
28 28
 */
29 29
void Scheduler::get_task(int robot)
30 30
{
31
	waitingRobots.push(robots[robot]);
31
	waitingRobots.push(robots[robot-1]);
32 32
}
33 33

  
34 34
/** @Brief: Statically add orders to the Priority Queue Wrapper.*/
......
146 146
    string robot_name = msg->data.substr(9);
147 147
    for(unsigned int i=0; i<robots.size(); i++)
148 148
    {
149
      if(robots[i].name.compare(robot_name) == 0)
149
      if(robots[i].name.compare(robot_name) == 0){
150 150
        return;
151
      }
151 152
    }
152 153

  
153 154
    int id = robots.size() +1;

Also available in: Unified diff