BasedHardware / omi

AI wearables
https://omi.me
MIT License
3.64k stars 460 forks source link

Use relay for pinging ble device #845

Closed beastoin closed 1 month ago

beastoin commented 1 month ago

Summary by Entelligence.AI

github-actions[bot] commented 1 month ago

Image description Entelligence.AI

Walkthrough

This update introduces a new mechanism to manage Bluetooth Low Energy (BLE) device connections more efficiently. It adds a timestamp to track the last successful ping response, which helps in determining when to initiate the next ping. This change enhances the connection stability and optimizes the resource usage by avoiding unnecessary pings.

Changes

Files Summary
app/lib/services/device_connections.dart, app/lib/services/devices.dart Introduced a _pongAt field to track the last successful ping response from a BLE device. Updated the logic for pinging connected devices, now based on the last pong time. This improves connection management and reduces unnecessary pings.

"In the realm of bytes and bits, 🌐
A small change makes a big hit. 💥
With each ping and pong in the game, 🏓
Our BLE connections are never the same. 📡"


Uplevel your code reviews with Entelligence.AI Pro ### Entelligence.AI Pro If you like this project, please support us by purchasing the [Pro version](https://Entelligence.AI.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, Entelligence.AI Pro is free for open source projects.