10 leftMotorDegTotal = countL;
11 rightMotorDegTotal = countR;
12 return (leftMotorDegTotal + rightMotorDegTotal) / 2;
16 int32_t leftMotorDeg = countL - leftMotorDegOld;
17 int32_t rightMotorDeg = countR - rightMotorDegOld;
19 return (leftMotorDeg + rightMotorDeg) / 2;
24 leftMotorDegOld = leftMotorDegTotal;
25 rightMotorDegOld = rightMotorDegTotal;
void resetDistance(int32_t countL, int32_t countR)
std::int32_t getDistanceCurrent(std::int32_t countL, std::int32_t countR)
std::int32_t getDistanceTotal(std::int32_t countL, std::int32_t countR)