ble: Add device information service
This commit is contained in:
parent
cd84754465
commit
dc54b55230
4 changed files with 152 additions and 1 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -228,7 +228,18 @@ async fn main(spawner: Spawner) -> ! {
|
|||
serial[2]
|
||||
);
|
||||
let short_name = alloc::format!("V2X {:02x}{:02x}", serial[1], serial[2]); // max 8 chars!
|
||||
spawner.spawn(ble::run(controller, name, short_name).expect("Failed to spawn BLE task"));
|
||||
|
||||
let fw_revision = core::env!("GIT_REVISION");
|
||||
let sw_revision = util::get_feature_list().join(",");
|
||||
spawner.spawn(
|
||||
ble::run(
|
||||
controller,
|
||||
name,
|
||||
short_name,
|
||||
ble::DeviceInfo::new(&mac.to_string(), fw_revision, &sw_revision),
|
||||
)
|
||||
.expect("Failed to spawn BLE task"),
|
||||
);
|
||||
}
|
||||
|
||||
// Setup GNSS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue