FIX kMaxGearSize value

This commit is contained in:
fastium
2025-01-06 23:00:53 +01:00
parent d0ff3defa1
commit dfd94b647c
5 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ static constexpr uint8_t kMaxGear = 9;
// smallest gear (= 1) corresponds to a gear size of 20
// when the gear increases, the gear size descreases
static constexpr uint8_t kMaxGearSize = 20;
static constexpr uint8_t kMinGearSize = kMaxGearSize - kMinGear;
static constexpr uint8_t kMinGearSize = kMaxGearSize - kMaxGear;
// pedal related constants
// When compiling and linking with gcc, we get a link error when using static

View File

@ -80,7 +80,7 @@ class Speedometer {
float _currentSpeed = 0.0f;
Mutex _totalDistanceMutex;
float _totalDistance = 0.0f;
uint8_t _gearSize = bike_computer::kMinGearSize;
uint8_t _gearSize = bike_computer::kMaxGearSize;
#if defined(MBED_TEST_MODE)
mbed::Callback<void()> _cb;