Mercurial > public > ostc4
comparison Discovery/Src/logbook_miniLive.c @ 981:c6c781a2e85b default
Merge into default
| author | heinrichsweikamp |
|---|---|
| date | Tue, 11 Feb 2025 18:12:00 +0100 |
| parents | 6d8ae8fbccf5 |
| children | b0d3e8b84966 |
comparison
equal
deleted
inserted
replaced
| 871:f7318457df4d | 981:c6c781a2e85b |
|---|---|
| 365 else | 365 else |
| 366 { | 366 { |
| 367 ReplayDataOffset = StepBackwards; | 367 ReplayDataOffset = StepBackwards; |
| 368 logbook_getHeader(StepBackwards ,&logbookHeader); | 368 logbook_getHeader(StepBackwards ,&logbookHeader); |
| 369 | 369 |
| 370 dataLength = logbook_readSampleData(StepBackwards, DEPTH_DATA_LENGTH, ReplayDepthData,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ReplayMarkerData); | 370 dataLength = logbook_readSampleData(StepBackwards, DEPTH_DATA_LENGTH, ReplayDepthData,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ReplayMarkerData); |
| 371 | 371 |
| 372 /* check if a marker is provided. If not disable marker functionality for the replay block */ | 372 /* check if a marker is provided. If not disable marker functionality for the replay block */ |
| 373 for(index = 0; index < dataLength; index++) | 373 for(index = 0; index < dataLength; index++) |
| 374 { | 374 { |
| 375 if(ReplayMarkerData[index] != 0) | 375 if(ReplayMarkerData[index] != 0) |
| 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 { |
