diff --git a/src/pm3.rs b/src/pm3.rs index fafa4bd..4ff6881 100644 --- a/src/pm3.rs +++ b/src/pm3.rs @@ -34,10 +34,15 @@ pub async fn run_pm3(tx: broadcast::Sender) -> Result<(), Box let mut reader = BufReader::new(stdout).lines(); + let mut last_id: String = "".to_owned(); + while let Some(line) = reader.next_line().await? { trace!("PM3: {line}"); if let Some(uid) = super::parser::parse_line(&line) { - tx.send(uid)?; + if last_id == uid { + tx.send(uid.clone())?; + } + last_id = uid.to_owned(); } }