forked from Blendman974/faceclaw
Add "Show BLE bandwidth usage" option to developer settings
This commit is contained in:
1 parent
641e8e322e
commit
85508b87ca
10 files changed
+153
-2
No files matched your search
@@ -0,0 +1,16 @@
|
||||
declare const com: any;
|
||||
|
||||
export interface BleTrafficSample {
|
||||
/** Outbound messages (writeFrames calls) since process start. */
|
||||
messages: number;
|
||||
/** Outbound payload bytes (sum of frame sizes) since process start. */
|
||||
bytes: number;
|
||||
/** Display frames whose last message was acked, since process start. */
|
||||
frames: number;
|
||||
}
|
||||
|
||||
/** Running totals of outbound BLE traffic, counted process-wide in FaceclawBleManager. */
|
||||
export function sampleBleTraffic(): BleTrafficSample {
|
||||
const raw = com.faceclaw.app.FaceclawBleManager.sampleOutboundTraffic();
|
||||
return { messages: Number(raw[0]), bytes: Number(raw[1]), frames: Number(raw[2]) };
|
||||
}
|
||||
Reference in new issue
Block a user