Skip to content

Commit 6cde62e

Browse files
committed
feat: display version on setup page
1 parent 9c05643 commit 6cde62e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ fn main() -> anyhow::Result<()> {
138138
let ble_addr = bt::bt(setting.clone(), evt_tx).unwrap();
139139
log_heap();
140140

141+
let version = env!("CARGO_PKG_VERSION");
142+
141143
gui.state = "Please setup device by bt".to_string();
142-
gui.text = format!("Goto https://echokit.dev/setup/ to set up the device.\nPress K0 to continue\nDevice Name: EchoKit-{}", ble_addr);
144+
gui.text = format!("Goto https://echokit.dev/setup/ to set up the device.\nDevice Name: EchoKit-{}\nVersion: {}", ble_addr, version);
143145
gui.display_qrcode("https://echokit.dev/setup/").unwrap();
144146

145147
#[cfg(feature = "boards")]
@@ -166,6 +168,7 @@ fn main() -> anyhow::Result<()> {
166168
log::info!("Received event to enter setup");
167169
}
168170
}
171+
tokio::time::sleep(std::time::Duration::from_millis(500)).await;
169172
});
170173

171174
{

0 commit comments

Comments
 (0)