Control Steering Module
if (left_sensor && right_sensor)
call abort_function(sensor error);
if (left_sensor)
if (previous_turn == left)
turn_HARD_left;
else
turn_left;
set previous_turn = left;
if (right_sensor)
if (previous_turn == right)
turn_HARD_right;
else
turn_right;
set previous_turn = right;
else
go_straight
set previous_turn = NONE
end Control Steering Module
0 komen