sync
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user