Fix message display and add voice note debugging

- Fix escaped backslashes in timestamp and sender name display
- Add comprehensive logging for voice note transmission pipeline
- Add peripheral write completion logging
- Track broadcast success/failure for central updates
- Log audio recorder creation and preparation steps
- Better diagnostics for troubleshooting voice note issues
This commit is contained in:
jack
2025-07-03 23:28:07 +02:00
parent 78ddb36db7
commit 8346ecd2a7
4 changed files with 23 additions and 6 deletions
+12 -3
View File
@@ -373,10 +373,19 @@ class BluetoothMeshService: NSObject {
// Send to subscribed centrals (as peripheral)
if characteristic != nil && !subscribedCentrals.isEmpty {
peripheralManager.updateValue(data, for: characteristic, onSubscribedCentrals: subscribedCentrals)
print("[BROADCAST] Sent to \(subscribedCentrals.count) subscribed centrals")
let success = peripheralManager.updateValue(data, for: characteristic, onSubscribedCentrals: subscribedCentrals)
if success {
print("[BROADCAST] Successfully sent to \(subscribedCentrals.count) subscribed centrals")
} else {
print("[BROADCAST] Failed to send to centrals - queue full, will retry on delegate callback")
}
} else {
print("[BROADCAST] No subscribed centrals to send to")
if characteristic == nil {
print("[BROADCAST] No characteristic available")
}
if subscribedCentrals.isEmpty {
print("[BROADCAST] No subscribed centrals")
}
}
}