updated readme and tui
Some checks failed
Rust / Clippy (push) Has been cancelled
Rust / Test (nightly) (push) Has been cancelled
Rust / Test (stable) (push) Has been cancelled

This commit is contained in:
2026-01-05 08:59:28 +08:00
parent 6675986579
commit 55e8362a7f
3 changed files with 9 additions and 4 deletions

View File

@@ -23,6 +23,10 @@ pub async fn find_maestro_device(adapter: &Adapter) -> Result<Device> {
continue;
}
if !dev.is_connected().await.unwrap_or(false) {
continue;
}
let uuids = dev.uuids().await?.unwrap_or_default();
if !uuids.contains(&maestro::UUID) {
continue;

View File

@@ -1,4 +1,4 @@
use std::{io, time::Duration};
use std::{fs::File, io, sync::Mutex, time::Duration};
use anyhow::Result;
use crossterm::{
event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
@@ -18,9 +18,11 @@ use maestro_client::{ClientCommand, ClientEvent};
#[tokio::main(flavor = "multi_thread", worker_threads = 2)]
async fn main() -> Result<()> {
let log_file = File::create("pbpctui.log")?;
tracing_subscriber::fmt()
.with_max_level(tracing::Level::INFO)
.with_writer(std::io::stderr)
.with_writer(Mutex::new(log_file))
.with_ansi(false)
.init();
// Setup terminal