No description
  • Swift 97.7%
  • Python 2.3%
Find a file
dademara5-collab fefe98462c Fix LiDAR crash and freeze when switching to Valutazione tab
Three root causes addressed:

1. NSException crash: AVDepthData.converting() raises an uncatchable
   NSException if the target format is not in availableDepthDataTypes.
   Fix: check availableDepthDataTypes (as [NSNumber]) before calling
   converting(); fall back to native format so sampleDepth can decide.

2. Buffer overflow: sampleDepth() always read 4 bytes (Float32) even when
   the pixel buffer contained Float16 (2 bytes) → wrong offsets → EXC_BAD_ACCESS.
   Fix: branch on depthDataType, read Float32 directly or convert Float16 bits.

3. UI freeze during tab switch: liveDistances was dispatched to main thread
   15×/s while SwiftUI was animating the transition. Throttled to ~3fps
   (every 5 processed frames). Also added distanceFrameCounter reset in stop().

Bonus: use AVCaptureDevice.DiscoverySession(.builtInLiDARDepthCamera) for
strict LiDAR-only detection instead of checking formats generically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-31 10:40:55 +01:00
raspberry_pi Add camera PDF reports, court side selector, and performance improvements 2026-10-28 23:24:05 +01:00
TeamPulse Fix LiDAR crash and freeze when switching to Valutazione tab 2026-10-31 10:40:55 +01:00
TeamPulse.xcodeproj Fix Swift warnings and polish camera-only mode UI 2026-10-28 22:20:26 +01:00
TeamPulseTests Initial Commit 2025-08-12 17:56:56 +02:00
TeamPulseUITests Initial Commit 2025-08-12 17:56:56 +02:00
.gitignore Add camera PDF reports, court side selector, and performance improvements 2026-10-28 23:24:05 +01:00