mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Bugfix: cycling sensors report wheel count as UINT32 - data type must be long, int is too small.
Also forgot to fix tests. Fixes #810.
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ public class SensorDataCyclingTest {
|
||||
@Test
|
||||
public void compute_speed_rollOverCount() {
|
||||
// given
|
||||
SensorDataCycling.DistanceSpeed previous = new SensorDataCycling.DistanceSpeed("sensorAddress", "sensorName", UintUtils.UINT16_MAX - 1, 1024);
|
||||
SensorDataCycling.DistanceSpeed previous = new SensorDataCycling.DistanceSpeed("sensorAddress", "sensorName", UintUtils.UINT32_MAX - 1, 1024);
|
||||
SensorDataCycling.DistanceSpeed current = new SensorDataCycling.DistanceSpeed("sensorAddress", "sensorName", 0, 2048);
|
||||
|
||||
// when
|
||||
|
||||
@@ -18,6 +18,6 @@ public class UintUtilsTest {
|
||||
|
||||
@Test
|
||||
public void realData() {
|
||||
assertEquals(3, UintUtils.diff(381616, 381615, UintUtils.UINT32_MAX));
|
||||
assertEquals(1, UintUtils.diff(381616, 381615, UintUtils.UINT32_MAX));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user