ErickSimoes/Ultrasonic

Change the distanceRead() method to receive the divisor

ErickSimoes opened this issue · 0 comments

The method can be simplified if the constants CM and INC represent the divisors, like this:

unsigned int Ultrasonic::distanceRead(uint8_t divisor) {
    return timing() / divisor / 2;
}