Skip to content

Commit

Permalink
Merge pull request #16 from ut-issl/15-add-warning-on-distance-sensor
Browse files Browse the repository at this point in the history
Add warning when distance is out of range
  • Loading branch information
conjikidow authored Mar 15, 2024
2 parents 0a4c36f + a8a2d22 commit 129bc9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/device/ultrasonic_distance_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace Device
if (distance > min_range_ && distance < max_range_) {
return distance;
} else {
Utility::logger.warning(F("[UltrasonicDistanceSensor] Out of range, return -1 [m]"));
return -1;
}
}
Expand Down

0 comments on commit 129bc9f

Please sign in to comment.