When you are recording an activity and the timer is stopped, the value of Toybox.ActivityInfo.elapsedTime changes when you press the Lap button. This is reproducible on a Garmin Edge 1030, and in the simulator.
To reproduce:
- Create a simple data field.
- In the compute method of this simple data field, type the following code:
return info.elapsedTime / 1000;
- Run this simple data field either in the simulator, or on an Edge 1030.
- Press Start/Stop.
A new activity is started, and the timer starts. - After 4 seconds, press Start/Stop again.
The timer stops. Note that the value in the simple data field keeps increasing. This is what you would expect, because Toybox.ActivityInfo.elapsedTime is the total elapsed time of the current activity (as opposed to Toybox.ActivityInfo.timerTime, which only increases when the timer is on). - After 4 more seconds, when the value of the simple data field shows 8, press Lap.
The next value that the simple data field shows is NOT 9 (what you would expect), but 5. Thus, when you press Lap, info.elapsedTime is changed to the value (4) it had in the previous step, when you pressed Start/Stop for the second time.
This is not correct. Pressing Lap should not have any impact on Toybox.ActivityInfo.elapsedTime.
Additional information:
- Garmin Edge 1030, software version 7.00
- Eclipse Oxygen.3a Release (4.7.3a) on Windows 10
- Connect IQ SDK 3.0.11