forked from Blendman974/faceclaw
iOS porting: Image-sending performance: Pipelining, bounding-box updates
This commit is contained in:
1 parent
16764359bd
commit
79b6c276f8
15 files changed
+592
-57
No files matched your search
@@ -0,0 +1,17 @@
|
||||
/** Same units as Android FaceclawBleManager: protocol messages, framed write
|
||||
* bytes accepted by the transport, and fully acknowledged display updates.
|
||||
* Totals survive reconnects and the setting being switched off.
|
||||
*/
|
||||
export class BleTrafficCounters {
|
||||
private messages = 0
|
||||
private bytes = 0
|
||||
private frames = 0
|
||||
recordWrite(bytes: number): void { this.bytes += bytes }
|
||||
recordMessage(): void { this.messages++ }
|
||||
recordDisplayFrame(): void { this.frames++ }
|
||||
sample(): { messages: number; bytes: number; frames: number } {
|
||||
return { messages: this.messages, bytes: this.bytes, frames: this.frames }
|
||||
}
|
||||
}
|
||||
// The iOS BLE session and phone UI both run in the main isolate.
|
||||
export const iosBleTraffic = new BleTrafficCounters()
|
||||
Reference in new issue
Block a user