diff --git a/src/tasks/ble.rs b/src/tasks/ble.rs index 6f09bfe..2badcda 100644 --- a/src/tasks/ble.rs +++ b/src/tasks/ble.rs @@ -1,12 +1,10 @@ -use core::ptr::slice_from_raw_parts; - use embassy_executor::Spawner; use embassy_futures::select::Either; use embassy_sync::{blocking_mutex::raw::NoopRawMutex, pubsub::{DynSubscriber, PubSubChannel, Publisher}}; use esp_radio::ble::controller::BleConnector; -use static_cell::{ConstStaticCell, StaticCell}; -use trouble_host::{attribute, prelude::*, types::gatt_traits::FromGattError}; +use static_cell::StaticCell; +use trouble_host::{prelude::*, types::gatt_traits::FromGattError}; use log::*; use crate::{backoff::Backoff, events::Prediction}; @@ -55,7 +53,7 @@ struct LocationData { impl FixedGattValue for LocationData { fn as_gatt(&self) -> &[u8] { - let databuf = [0;Self::SIZE]; + //let databuf = [0;Self::SIZE]; unsafe { core::slice::from_raw_parts(self as *const Self as *const u8, Self::SIZE) } }