keep at most 3 messages in the channel

This commit is contained in:
Vladan Popovic 2023-02-20 17:14:23 +01:00
parent 7a22f14e1f
commit 5e6810cae8

View file

@ -32,7 +32,7 @@ fn main() -> anyhow::Result<()> {
let gps_uart = dp.uart2; let gps_uart = dp.uart2;
let (gps_sender, receiver) = std::sync::mpsc::sync_channel::<Msg>(10); let (gps_sender, receiver) = std::sync::mpsc::sync_channel::<Msg>(3);
//let accel_sender = gps_sender.clone(); //let accel_sender = gps_sender.clone();
//let _ = gps::main(gps_tx, gps_rx, gps_uart, gps_sender)?; //let _ = gps::main(gps_tx, gps_rx, gps_uart, gps_sender)?;