This commit is contained in:
2026-05-26 17:22:30 +02:00
parent 2d3ea34603
commit e74437a846
2 changed files with 2 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ export const SETTINGS = {
bluetooth: { bluetooth: {
connectionTimeoutMs: 3000, // Timeout für den Verbindungsaufbau connectionTimeoutMs: 3000, // Timeout für den Verbindungsaufbau
appleMaxInflight: 15, // iOS erlaubt nur wenige unbestätigte Nachrichten, daher begrenzen wir die Anzahl der gleichzeitig gesendeten Frames appleMaxInflight: 15, // iOS erlaubt nur wenige unbestätigte Nachrichten, daher begrenzen wir die Anzahl der gleichzeitig gesendeten Frames
batteryPollIntervalMs: 60_000, // Intervall für periodische BATT_INFO-Abfragen
}, },
ui: { ui: {
toastDurationMs: 5000, toastDurationMs: 5000,

View File

@@ -10,7 +10,7 @@ const isMac = navigator.userAgent.includes('Macintosh') || navigator.userAgent.i
const MAX_INFLIGHT = isMac ? SETTINGS.bluetooth.appleMaxInflight : Infinity; // iOS erlaubt nur wenige unbestätigte Nachrichten const MAX_INFLIGHT = isMac ? SETTINGS.bluetooth.appleMaxInflight : Infinity; // iOS erlaubt nur wenige unbestätigte Nachrichten
console.log("Transport: Max Inflight Frames =", MAX_INFLIGHT); console.log("Transport: Max Inflight Frames =", MAX_INFLIGHT);
const BATT_POLL_INTERVAL_MS = 60_000; const BATT_POLL_INTERVAL_MS = Math.max(1_000, SETTINGS.bluetooth.batteryPollIntervalMs);
export type FrameSender = (buffer: ArrayBuffer) => Promise<void>; export type FrameSender = (buffer: ArrayBuffer) => Promise<void>;
let currentSender: FrameSender | null = null; let currentSender: FrameSender | null = null;