(central: &Adapter)
| 13 | use tokio::time; |
| 14 | |
| 15 | async fn find_light(central: &Adapter) -> Option<Peripheral> { |
| 16 | for p in central.peripherals().await.unwrap() { |
| 17 | if p.properties() |
| 18 | .await |
| 19 | .unwrap() |
| 20 | .unwrap() |
| 21 | .local_name |
| 22 | .iter() |
| 23 | .any(|name| name.contains("LEDBlue")) |
| 24 | { |
| 25 | return Some(p); |
| 26 | } |
| 27 | } |
| 28 | None |
| 29 | } |
| 30 | |
| 31 | #[tokio::main] |
| 32 | async fn main() -> anyhow::Result<()> { |
no test coverage detected