Project

General

Profile

Revision 5866cb38

ID5866cb38bf3954babc911a0d0bea69b8dc696cba

Added by Alex Zirbel about 12 years ago

Linesensor tested and done!

View differences:

scout/scoutsim/src/scout.cpp
200 200
            int sensor_x = (int) (x - LNSNSR_D * cos(theta) - offset * sin(theta));
201 201
            int sensor_y = (int) (y + LNSNSR_D * sin(theta) - offset * cos(theta));
202 202

  
203
            /*
204
            if (s == 0)
205
            {
206
                cout << "s: " << s << ", offset: " << offset << ", scout: (" << x <<
207
                        ", " << y << "), sensor: (" << sensor_x <<
208
                        ", " << sensor_y << ")" << endl;
209
            }
210
            */
211

  
212 203
            unsigned char r = lines_image.GetRed(sensor_x, sensor_y);
213 204
            unsigned char g = lines_image.GetGreen(sensor_x, sensor_y);
214 205
            unsigned char b = lines_image.GetBlue(sensor_x, sensor_y);

Also available in: Unified diff