delete dead commented cde
This commit is contained in:
@@ -124,14 +124,6 @@ async fn gatt_events_task<P: PacketPool>(server: &Server<'_>,
|
||||
GattConnectionEvent::Disconnected { reason } => break reason,
|
||||
GattConnectionEvent::Gatt { event } => {
|
||||
match &event {
|
||||
// // are these clauses important? they don't do anything
|
||||
// // except log
|
||||
// GattEvent::Read(event) => {
|
||||
// if event.handle() == level.handle {
|
||||
// let value = server.get(&level);
|
||||
// info!("[gatt] Read Event to Level Characteristic: {:?}", value);
|
||||
// }
|
||||
// }
|
||||
GattEvent::Write(event) => {
|
||||
info!("[gatt] write handle {:?} {:?}", event.handle(),
|
||||
event.data());
|
||||
@@ -208,22 +200,7 @@ async fn custom_task<C: Controller, P: PacketPool>(
|
||||
conn: &GattConnection<'_, '_, P>,
|
||||
stack: &Stack<'_, C, P>,
|
||||
) {
|
||||
// let mut tick: u8 = 0;
|
||||
// let level = server.battery_service.level;
|
||||
// let rpm = server.engine_speed_service.rpm;
|
||||
loop {
|
||||
// tick = tick.wrapping_add(1);
|
||||
// info!("[custom_task] notifying connection of tick {}", tick);
|
||||
|
||||
// // if the characteristic does not support notifications,
|
||||
// // this would return an error. Use `set` instead, in that case.
|
||||
// // See inline comments in trouble-host/src/attribute.rs around
|
||||
// // line 631
|
||||
|
||||
// if level.notify(conn, &tick).await.is_err() {
|
||||
// info!("[custom_task] error notifying connection");
|
||||
// break;
|
||||
// };
|
||||
// read RSSI (Received Signal Strength Indicator) of the connection.
|
||||
if let Ok(rssi) = conn.raw().rssi(stack).await {
|
||||
info!("[custom_task] RSSI: {:?}", rssi);
|
||||
@@ -231,8 +208,6 @@ async fn custom_task<C: Controller, P: PacketPool>(
|
||||
info!("[custom_task] error getting RSSI");
|
||||
break;
|
||||
};
|
||||
// let new_rpm = 1200 + 20 * i32::from(tick);
|
||||
// rpm.notify(conn, &new_rpm).await.expect("failed to notify");
|
||||
|
||||
Timer::after_secs(2).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user