diff --git a/src/message_broker.rs b/src/message_broker.rs index ddf1c1717dbeb0849581b28dc43f2c33d5cdad9c..4ee02ca8de8ed4a3e1f3984a923a7f6317c6aa24 100644 --- a/src/message_broker.rs +++ b/src/message_broker.rs @@ -23,7 +23,7 @@ use crate::{ mavlink::{MavFrame, MavHeader, MavMessage, MavlinkVersion, TimedMessage}, }; -const RECEPTION_QUEUE_INTERVAL: Duration = Duration::from_secs(1); +const RECEPTION_QUEUE_INTERVAL: Duration = Duration::from_secs(3); const SEGS_SYSTEM_ID: u8 = 1; const SEGS_COMPONENT_ID: u8 = 1; diff --git a/src/ui/widgets/reception_led.rs b/src/ui/widgets/reception_led.rs index 4c064eab79d3dee4bac8e021f0a6c5bc73eca29c..6e30c0db98e9c8493a72262e2a025677bcefb395 100644 --- a/src/ui/widgets/reception_led.rs +++ b/src/ui/widgets/reception_led.rs @@ -38,12 +38,12 @@ impl ReceptionLed { } fn show_label(&self, ui: &mut Ui) -> Response { - if self.active { - let text = format!("{} Hz", self.frequency); - ui.label(text) + let text = if self.frequency > 0.0 { + format!("{:.2} msgs/s", self.frequency) } else { - ui.label("N/A") - } + "N/A".to_owned() + }; + ui.label(text) } }