Mercurial > public > ostc4
diff Discovery/Src/logbook_miniLive.c @ 910:7bd347bdaa81 Evo_2_23
Devbugfix Sample time resolution for longer dives:
If a dive is longer than the provided replay buffer then the sample data is compressed. This compression was not considered in the previous version. As result the dive was replayed with double speed because a single sample were interpretated as 2 seconds instead of e.g. 4 seconds for a compressed sample. The comprassion rate is now considered in the simulator replay function
author | Ideenmodellierer |
---|---|
date | Tue, 15 Oct 2024 19:12:05 +0200 |
parents | bf574fb3efa0 |
children |
line wrap: on
line diff
--- a/Discovery/Src/logbook_miniLive.c Tue Oct 15 19:07:19 2024 +0200 +++ b/Discovery/Src/logbook_miniLive.c Tue Oct 15 19:12:05 2024 +0200 @@ -383,14 +383,7 @@ ReplayMarkerData[0] = 0xFF; } - if( dataLength == DEPTH_DATA_LENGTH) /* log data has been compressed to fit into buffer */ - { - ReplayDataResolution = (logbookHeader.diveTimeMinutes * 60 + logbookHeader.diveTimeSeconds) / dataLength; - } - else - { - ReplayDataResolution = logbookHeader.samplingRate; - } + ReplayDataResolution = logbookHeader.total_diveTime_seconds / dataLength; ReplayDataLength = dataLength; ReplayDataMaxDepth = logbookHeader.maxDepth; ReplayDataMinutes = logbookHeader.diveTimeMinutes;