Skip to content

Commit

Permalink
src: webpage: src: Add frequency control
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Nov 4, 2024
1 parent 08fe442 commit cd9c473
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/webpage/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,17 @@ pub struct App {
search_query: String,
collapse_all: bool,
expand_all: bool,
stats_frequency: Arc<Mutex<f32>>,
}

impl Default for App {
fn default() -> Self {
let (mavlink_sender, mavlink_receiver) =
connect_websocket(MAVLINK_MESSAGES_WEBSOCKET_PATH).unwrap();

let stats_frequency = Arc::new(Mutex::new(1.));
get_stats_frequency(&stats_frequency);

let (hub_messages_stats_sender, hub_messages_stats_receiver) =
connect_websocket(HUB_MESSAGES_STATS_WEBSOCKET_PATH).unwrap();

Expand All @@ -78,6 +82,7 @@ impl Default for App {
search_query: String::new(),
collapse_all: false,
expand_all: false,
stats_frequency,
}
}
}
Expand Down

0 comments on commit cd9c473

Please sign in to comment.