eculocate

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit bdcfaf07fc8f37e1224848f74d2560cb2c393b78
parent 4f79126db1502c7dfc72404a4a0b690497cec005
Author: Daniel Barlow <dan@telent.net>
Date:   Sun, 16 Nov 2025 23:55:06 +0000

speculate, bloviate

Diffstat:
Mnotes.md | 17++++++++++++-----
Msrc/wibble.rs | 2++
2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/notes.md b/notes.md @@ -171,8 +171,15 @@ A common practice is to choose a base UUID for the custom service and then incre So far there is none. This is my first Rust program -We'd like shared "scoreboard" of all the values which is mutated by -the ecu-polling code and read by the BLE publishing code. - -It would be good to know whether the data was stale (have we lost ECU -connection? some other problem?) +there is a loop +in the loop + poll the uart for some data tables, (re-)opening it if needed + parse the tables into values + update the ecu\_state with what we find + wibble.publish(ecu\_state) + +so we need an instance of a struct to keep all the BLE stuffs +together, and for it to have a publish() method + +and an instance of a struct to keep all the uart stuff +together, and for it to have a publish() method diff --git a/src/wibble.rs b/src/wibble.rs @@ -120,6 +120,8 @@ async fn gatt_events_task<P: PacketPool>(server: &Server<'_>, conn: &GattConnect 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);