Tobis Programm forked to not destroy your golden files
Fork of Robocode by
Diff: source/Mapping.cpp
- Revision:
- 52:56399c2f13cd
- Parent:
- 51:4a18b47fd659
- Child:
- 57:1a395b6928ee
--- a/source/Mapping.cpp Sat Apr 15 00:18:50 2017 +0000 +++ b/source/Mapping.cpp Tue Apr 18 11:50:02 2017 +0000 @@ -44,7 +44,7 @@ } else { object = 1; } - position mapping_pos = position_calculation(distance0, servo_angle, 0.12, 0.12, current_heading, current_pos); + position mapping_pos = position_calculation(distance0, servo_angle, 0.12, -0.12, current_heading, current_pos); draw_to_map(mapping_pos, object); } //check_sensor(right); @@ -58,7 +58,7 @@ } else { object = 1; } - position mapping_pos = position_calculation(distance4, -servo_angle, -0.12, 0.12, current_heading, current_pos); + position mapping_pos = position_calculation(distance4, -servo_angle, -0.12, -0.12, current_heading, current_pos); draw_to_map(mapping_pos, object); } //check_sensor(center); @@ -71,7 +71,7 @@ } else { object = 1; } - position mapping_pos = position_calculation(distance2, 0, -0.12, 0.12, current_heading, current_pos); + position mapping_pos = position_calculation(distance2, 0, -0.12, -0.12, current_heading, current_pos); draw_to_map(mapping_pos, object); } @@ -127,13 +127,14 @@ //****************************************************************************** void print_map() { + // Debug function for printing the obstacle matrix on putty. for (int y = 0; y < col; y++) { for (int x = 0; x < row; x++) { printf("%d ", obstacle_list[y][x]); } - printf("\n"); + printf("\r\n"); } - printf("\n"); + printf("\r\n"); } //******************************************************************************