tasks: ble: cleanup
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
|
|
||||||
use core::ptr::slice_from_raw_parts;
|
|
||||||
|
|
||||||
use embassy_executor::Spawner;
|
use embassy_executor::Spawner;
|
||||||
use embassy_futures::select::Either;
|
use embassy_futures::select::Either;
|
||||||
use embassy_sync::{blocking_mutex::raw::NoopRawMutex, pubsub::{DynSubscriber, PubSubChannel, Publisher}};
|
use embassy_sync::{blocking_mutex::raw::NoopRawMutex, pubsub::{DynSubscriber, PubSubChannel, Publisher}};
|
||||||
use esp_radio::ble::controller::BleConnector;
|
use esp_radio::ble::controller::BleConnector;
|
||||||
use static_cell::{ConstStaticCell, StaticCell};
|
use static_cell::StaticCell;
|
||||||
use trouble_host::{attribute, prelude::*, types::gatt_traits::FromGattError};
|
use trouble_host::{prelude::*, types::gatt_traits::FromGattError};
|
||||||
use log::*;
|
use log::*;
|
||||||
|
|
||||||
use crate::{backoff::Backoff, events::Prediction};
|
use crate::{backoff::Backoff, events::Prediction};
|
||||||
@@ -55,7 +53,7 @@ struct LocationData {
|
|||||||
|
|
||||||
impl FixedGattValue for LocationData {
|
impl FixedGattValue for LocationData {
|
||||||
fn as_gatt(&self) -> &[u8] {
|
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) }
|
unsafe { core::slice::from_raw_parts(self as *const Self as *const u8, Self::SIZE) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user