mirror of
https://codeberg.org/icewind/mitemp-rs.git
synced 2026-06-03 17:24:08 +02:00
0.3.0
This commit is contained in:
parent
68b7c2ddcc
commit
15e70d0212
4 changed files with 24 additions and 22 deletions
|
|
@ -41,9 +41,9 @@ const UUID: Uuid = Uuid::from_bytes([
|
|||
/// Listen for sensor data
|
||||
///
|
||||
/// Returns an iterator that will block waiting for new sensor data
|
||||
pub async fn listen<'a, A: Central + 'static>(
|
||||
adapter: &'a A,
|
||||
) -> Result<impl Stream<Item = Sensor> + 'a, btleplug::Error> {
|
||||
pub async fn listen<A: Central>(
|
||||
adapter: &A,
|
||||
) -> Result<impl Stream<Item = Sensor>, btleplug::Error> {
|
||||
let mut sensors: HashMap<BDAddr, SensorRawData> = HashMap::new();
|
||||
|
||||
let event_receiver = adapter.events().await?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue