Skip to content

Commit

Permalink
Have used black boundary instead of 700 to avoid hard coding
Browse files Browse the repository at this point in the history
  • Loading branch information
pavit15 committed Feb 3, 2024
1 parent cbc897c commit 01ea8dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 6_line_following/main/line_following.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ void calculate_error()
{
all_black_flag = 0;
}
if(line_sensor_readings.adc_reading[i] > 700)
if(line_sensor_readings.adc_reading[i] > BLACK_BOUNDARY)
{
k = 1;
}
if(line_sensor_readings.adc_reading[i] < 700)
if(line_sensor_readings.adc_reading[i] < BLACK_BOUNDARY)
{
k = 0;
}
Expand Down

0 comments on commit 01ea8dc

Please sign in to comment.