comparison 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
comparison
equal deleted inserted replaced
909:6902bb4b6b2e 910:7bd347bdaa81
381 if(markerDetected == 0) 381 if(markerDetected == 0)
382 { 382 {
383 ReplayMarkerData[0] = 0xFF; 383 ReplayMarkerData[0] = 0xFF;
384 } 384 }
385 385
386 if( dataLength == DEPTH_DATA_LENGTH) /* log data has been compressed to fit into buffer */ 386 ReplayDataResolution = logbookHeader.total_diveTime_seconds / dataLength;
387 {
388 ReplayDataResolution = (logbookHeader.diveTimeMinutes * 60 + logbookHeader.diveTimeSeconds) / dataLength;
389 }
390 else
391 {
392 ReplayDataResolution = logbookHeader.samplingRate;
393 }
394 ReplayDataLength = dataLength; 387 ReplayDataLength = dataLength;
395 ReplayDataMaxDepth = logbookHeader.maxDepth; 388 ReplayDataMaxDepth = logbookHeader.maxDepth;
396 ReplayDataMinutes = logbookHeader.diveTimeMinutes; 389 ReplayDataMinutes = logbookHeader.diveTimeMinutes;
397 if(dataLength != 0) 390 if(dataLength != 0)
398 { 391 {