ADD preparation for tests
This commit is contained in:
@@ -80,7 +80,6 @@ float Speedometer::getDistance() {
|
||||
}
|
||||
|
||||
void Speedometer::reset() {
|
||||
// TODO : done
|
||||
this->_totalDistanceMutex.lock();
|
||||
this->_totalDistance = 0.0f;
|
||||
this->_totalDistanceMutex.unlock();
|
||||
@@ -96,6 +95,7 @@ float Speedometer::getTraySize() const { return kTraySize; }
|
||||
std::chrono::milliseconds Speedometer::getCurrentPedalRotationTime() const {
|
||||
return _pedalRotationTime;
|
||||
}
|
||||
void Speedometer::setOnResetCallback(mbed::Callback<void()> cb) { _cbOnReset = cb; }
|
||||
|
||||
#endif // defined(MBED_TEST_MODE)
|
||||
|
||||
@@ -107,7 +107,6 @@ void Speedometer::computeSpeed() {
|
||||
// = 6.99m If you ride at 80 pedal turns / min, you run a distance of 6.99 * 80 / min
|
||||
// ~= 560 m / min = 33.6 km/h
|
||||
|
||||
// TODO : done
|
||||
// Distance run with one pedal turn = tray size / rear gear size * circumference of
|
||||
// the wheel
|
||||
constexpr float ms_in_hour = static_cast<float>(3600 * 1000);
|
||||
@@ -129,7 +128,6 @@ void Speedometer::computeDistance() {
|
||||
// ~= 560 m / min = 33.6 km/h. We then multiply the speed by the time for getting the
|
||||
// distance traveled.
|
||||
|
||||
// TODO : done
|
||||
Speedometer::computeSpeed();
|
||||
// compute distance
|
||||
|
||||
|
||||
Reference in New Issue
Block a user