Revision c840fbe6 scout/libscout/src/behaviors/line_follow.cpp

View differences:

scout/libscout/src/behaviors/line_follow.cpp
30 30
static int motor_l;
31 31
static int motor_r;
32 32

  
33
Duration init_turn_time(0.5);
33
Duration init_turn_time(1.5);
34 34

  
35 35
void line_follow::follow_line()
36 36
{
......
67 67
  do
68 68
  {
69 69
    motor_l = -MOTOR_BASE;
70
    motor_r = MOTOR_BASE/8;
70
    motor_r = 3*MOTOR_BASE/5;
71 71

  
72 72
    motors->set_sides(motor_l, motor_r, MOTOR_ABSOLUTE);
73 73

  
......
100 100

  
101 101
    if(first)
102 102
    {
103
        while(line_loc < 2 && line_loc > -2)
103
        do
104
        {
104 105
          line_loc = linesensor->readline();
106
        }
107
        while(line_loc < 2 && line_loc > -2);
105 108

  
106 109
        first = false;
107 110
    }
......
116 119
  float line_loc;
117 120
  do
118 121
  {
119
    motor_l = MOTOR_BASE/8;
122
    motor_l = 3*MOTOR_BASE/5;
120 123
    motor_r = -MOTOR_BASE;
121 124

  
122 125
    motors->set_sides(motor_l, motor_r, MOTOR_ABSOLUTE);

Also available in: Unified diff